summaryrefslogtreecommitdiff
path: root/extension/src/continueIdeClient.ts
diff options
context:
space:
mode:
Diffstat (limited to 'extension/src/continueIdeClient.ts')
-rw-r--r--extension/src/continueIdeClient.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/extension/src/continueIdeClient.ts b/extension/src/continueIdeClient.ts
index 3b5de93f..fbad5f5d 100644
--- a/extension/src/continueIdeClient.ts
+++ b/extension/src/continueIdeClient.ts
@@ -159,7 +159,7 @@ class IdeProtocolClient {
editor.setDecorations(decorationType, [range]);
// Listen for changes to cursor position and then remove the decoration (but keep for at least 2 seconds)
- setTimeout(() => {
+ const allowRemoveHighlight = () => {
const cursorDisposable = vscode.window.onDidChangeTextEditorSelection(
(event) => {
if (event.textEditor.document.uri.fsPath === rangeInFile.filepath) {
@@ -168,7 +168,8 @@ class IdeProtocolClient {
}
}
);
- }, 2000);
+ };
+ setTimeout(allowRemoveHighlight, 2000);
}
}
@@ -285,7 +286,7 @@ class IdeProtocolClient {
edit.range.start.line,
edit.range.start.character,
edit.range.end.line,
- edit.range.end.character + 1
+ edit.range.end.character
);
editor.edit((editBuilder) => {