diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-06-12 12:21:26 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-06-12 12:21:26 -0700 |
commit | af350f5e70f20d14c361684e361b1e64e5e0b2c3 (patch) | |
tree | b840dd621f88974f4d4ea047737f16324cbad990 /extension | |
parent | 57a6d8fc0a808ca160b5f691882a7893ed438c97 (diff) | |
download | sncontinue-af350f5e70f20d14c361684e361b1e64e5e0b2c3.tar.gz sncontinue-af350f5e70f20d14c361684e361b1e64e5e0b2c3.tar.bz2 sncontinue-af350f5e70f20d14c361684e361b1e64e5e0b2c3.zip |
cleaner highlighting (from server side)
Diffstat (limited to 'extension')
-rw-r--r-- | extension/src/continueIdeClient.ts | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/extension/src/continueIdeClient.ts b/extension/src/continueIdeClient.ts index c395ae0e..035778a5 100644 --- a/extension/src/continueIdeClient.ts +++ b/extension/src/continueIdeClient.ts @@ -278,40 +278,13 @@ class IdeProtocolClient { undefined, vscode.ViewColumn.One ).then((editor) => { - let range = new vscode.Range( + const range = new vscode.Range( edit.range.start.line, edit.range.start.character, edit.range.end.line, edit.range.end.character ); - const decorationKey = - edit.replacement === "" - ? { - editorUri: editor.document.uri.fsPath, - options: { - range: new vscode.Range( - new vscode.Position(range.start.line, 0), - new vscode.Position(range.end.line + 1, 0) - ), - // after: { - // contentText: "Removed", - // }, - }, - decorationType: vscode.window.createTextEditorDecorationType({ - backgroundColor: "rgba(255, 0, 0, 0.2)", - }), - } - : { - editorUri: editor.document.uri.fsPath, - options: { - range, - }, - decorationType: vscode.window.createTextEditorDecorationType({ - backgroundColor: "rgba(66, 105, 55, 1.0)", - isWholeLine: true, - }), - }; - decorationManager.addDecoration(decorationKey); + editor.edit((editBuilder) => { this._makingEdit += 2; // editBuilder.replace takes 2 edits: delete and insert editBuilder.replace(range, edit.replacement); |