summaryrefslogtreecommitdiff
path: root/packages/vscode-ide-companion/src/recent-files-manager.ts
diff options
context:
space:
mode:
authorchristine betts <[email protected]>2025-07-24 19:54:41 +0000
committerGitHub <[email protected]>2025-07-24 19:54:41 +0000
commit4e376c0447dfb691bc4a7182d9778f81792269af (patch)
tree1c43edf6d157960f5269dea12c72f77c9df9ae56 /packages/vscode-ide-companion/src/recent-files-manager.ts
parentf9930c2d36e73f24d6199b899c60862a4b40f9ac (diff)
[ide-mode] Send the cursor and selected text from the IDE server (#4621)
Diffstat (limited to 'packages/vscode-ide-companion/src/recent-files-manager.ts')
-rw-r--r--packages/vscode-ide-companion/src/recent-files-manager.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/vscode-ide-companion/src/recent-files-manager.ts b/packages/vscode-ide-companion/src/recent-files-manager.ts
index cbe7e9a9..317cc903 100644
--- a/packages/vscode-ide-companion/src/recent-files-manager.ts
+++ b/packages/vscode-ide-companion/src/recent-files-manager.ts
@@ -47,11 +47,19 @@ export class RecentFilesManager {
this.add(newUri);
}
});
+
+ const selectionWatcher = vscode.window.onDidChangeTextEditorSelection(
+ () => {
+ this.fireWithDebounce();
+ },
+ );
+
context.subscriptions.push(
editorWatcher,
deleteWatcher,
closeWatcher,
renameWatcher,
+ selectionWatcher,
);
}