summaryrefslogtreecommitdiff
path: root/extension/src/continueIdeClient.ts
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-06-18 15:41:09 -0700
committerNate Sesti <sestinj@gmail.com>2023-06-18 15:41:09 -0700
commit53b7fac40d572217c7167075d765ae7dfff56fbe (patch)
treea3885a6ffae121c5dd68747374be05c2abc1df03 /extension/src/continueIdeClient.ts
parent9f4f8d48d51be2d140a722418d0a6c699c0f6cde (diff)
downloadsncontinue-53b7fac40d572217c7167075d765ae7dfff56fbe.tar.gz
sncontinue-53b7fac40d572217c7167075d765ae7dfff56fbe.tar.bz2
sncontinue-53b7fac40d572217c7167075d765ae7dfff56fbe.zip
a number of things
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);
}
}