summaryrefslogtreecommitdiff
path: root/extension/src/continueIdeClient.ts
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-06-19 09:59:01 -0700
committerNate Sesti <sestinj@gmail.com>2023-06-19 09:59:01 -0700
commit315de821c109a2ac45f4cb553890f941d33104bd (patch)
tree3f9a77345cb0ca36729e1f001eb3e88e2a2be147 /extension/src/continueIdeClient.ts
parentbc8a3aa9cca9fca058803ebd027ee3301479cef4 (diff)
downloadsncontinue-315de821c109a2ac45f4cb553890f941d33104bd.tar.gz
sncontinue-315de821c109a2ac45f4cb553890f941d33104bd.tar.bz2
sncontinue-315de821c109a2ac45f4cb553890f941d33104bd.zip
check for codespaces, stream edits
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) => {