Skip to content

Commit

Permalink
remove info message
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackson Kearl committed Feb 25, 2020
1 parent 8a9d92b commit 1bd6fe0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# VSCode: search-editor-apply-changes
# Search Editor: Apply Changes

In the marketplace [here](https://marketplace.visualstudio.com/items?itemName=jakearl.search-editor-apply-changes).

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/JacksonKearl/vscode-search-editor-apply-changes"
},
"icon": "icon.png",
"version": "0.0.2",
"version": "0.1.0",
"engines": {
"vscode": "^1.43.0"
},
Expand Down
5 changes: 1 addition & 4 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export function activate(context: vscode.ExtensionContext) {
let currentDocument: vscode.TextDocument | undefined;
let currentTarget: vscode.Uri | undefined;
const edit = new vscode.WorkspaceEdit();
let editedLines = 0;
let editedFiles = new Set();

const channel = vscode.window.createOutputChannel("Search Editor");
Expand All @@ -44,14 +43,12 @@ export function activate(context: vscode.ExtensionContext) {
editedFiles.add(currentTarget.toString());
channel.appendLine(filename);
}
channel.appendLine(` => ${newLine}`);
channel.appendLine(` ${oldLine.text} => ${newLine}`);
edit.replace(currentTarget, oldLine.range, newLine);
editedLines++;
}
}
}

vscode.window.showInformationMessage(`Modified ${editedLines} lines in ${editedFiles.size} files.`);
vscode.workspace.applyEdit(edit);

// Hack to get the state clean, as it in some ways is clean, and this reduces friction for SaveAll/etc.
Expand Down

0 comments on commit 1bd6fe0

Please sign in to comment.