diff options
author | Ty Dunn <ty@tydunn.com> | 2023-06-18 16:31:09 -0700 |
---|---|---|
committer | Ty Dunn <ty@tydunn.com> | 2023-06-18 16:31:09 -0700 |
commit | 04f008017cbe71d49b22e978af817d54f31b4a18 (patch) | |
tree | bd24a1d4318e89e406b18f3deeb943059e289e3b /extension/src/continueIdeClient.ts | |
parent | 130e2ea946ee52b9327fd37c76fc7cebfb15e64b (diff) | |
parent | 350873ccfac50ff84c2018e1d71eaf6089d4c5b7 (diff) | |
download | sncontinue-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.ts | 18 |
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); } } |