diff --git a/README.md b/README.md index 098f435..cef986c 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/package.json b/package.json index 755e44d..11b28c2 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/src/extension.ts b/src/extension.ts index ed9d111..63fe512 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -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"); @@ -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.