summaryrefslogtreecommitdiff
path: root/extension/src/continueIdeClient.ts
diff options
context:
space:
mode:
authorTy Dunn <ty@tydunn.com>2023-06-18 16:31:09 -0700
committerTy Dunn <ty@tydunn.com>2023-06-18 16:31:09 -0700
commit04f008017cbe71d49b22e978af817d54f31b4a18 (patch)
treebd24a1d4318e89e406b18f3deeb943059e289e3b /extension/src/continueIdeClient.ts
parent130e2ea946ee52b9327fd37c76fc7cebfb15e64b (diff)
parent350873ccfac50ff84c2018e1d71eaf6089d4c5b7 (diff)
downloadsncontinue-04f008017cbe71d49b22e978af817d54f31b4a18.tar.gz
sncontinue-04f008017cbe71d49b22e978af817d54f31b4a18.tar.bz2
sncontinue-04f008017cbe71d49b22e978af817d54f31b4a18.zip
Merge branch 'main' into styled-code
Diffstat (limited to 'extension/src/continueIdeClient.ts')
-rw-r--r--extension/src/continueIdeClient.ts18
1 files changed, 10 insertions, 8 deletions
diff --git a/extension/src/continueIdeClient.ts b/extension/src/continueIdeClient.ts
index b4937ac4..3b5de93f 100644
--- a/extension/src/continueIdeClient.ts
+++ b/extension/src/continueIdeClient.ts
@@ -158,15 +158,17 @@ class IdeProtocolClient {
});
editor.setDecorations(decorationType, [range]);
- // Listen for changes to cursor position
- const cursorDisposable = vscode.window.onDidChangeTextEditorSelection(
- (event) => {
- if (event.textEditor.document.uri.fsPath === rangeInFile.filepath) {
- cursorDisposable.dispose();
- editor.setDecorations(decorationType, []);
+ // Listen for changes to cursor position and then remove the decoration (but keep for at least 2 seconds)
+ setTimeout(() => {
+ const cursorDisposable = vscode.window.onDidChangeTextEditorSelection(
+ (event) => {
+ if (event.textEditor.document.uri.fsPath === rangeInFile.filepath) {
+ cursorDisposable.dispose();
+ editor.setDecorations(decorationType, []);
+ }
}
- }
- );
+ );
+ }, 2000);
}
}