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 | 0851b826c069cbdd1706a4107feb90f0ffa13129 (patch) | |
tree | e361a9ee1f130b8bef5166a48fb8ea36d5bfb3a0 /extension | |
parent | f192b34b1732068e44c8fb00207058736ed9ca5a (diff) | |
download | sncontinue-0851b826c069cbdd1706a4107feb90f0ffa13129.tar.gz sncontinue-0851b826c069cbdd1706a4107feb90f0ffa13129.tar.bz2 sncontinue-0851b826c069cbdd1706a4107feb90f0ffa13129.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); |