From 0ae003aa57ea7962b3544e022b8eb65d50f65c22 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Mar 2026 15:05:19 +0000 Subject: [PATCH] Remove _currentSelection property, use selection.get() instead Co-authored-by: jrieken <1794099+jrieken@users.noreply.github.com> --- .../contrib/inlineChat/browser/inlineChatEditorAffordance.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.ts b/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.ts index 1a3f8926c10..0be9f4f0502 100644 --- a/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.ts +++ b/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.ts @@ -146,7 +146,6 @@ export class InlineChatEditorAffordance extends Disposable implements IContentWi private readonly _domNode: HTMLElement; private _position: IContentWidgetPosition | null = null; private _isVisible = false; - private _currentSelection: Selection | undefined; private readonly _onDidRunAction = this._store.add(new Emitter()); readonly onDidRunAction: Event = this._onDidRunAction.event; @@ -187,7 +186,6 @@ export class InlineChatEditorAffordance extends Disposable implements IContentWi this._store.add(autorun(r => { const sel = selection.read(r); - this._currentSelection = sel; if (sel) { this._show(sel); } else { @@ -196,7 +194,7 @@ export class InlineChatEditorAffordance extends Disposable implements IContentWi })); this._store.add(this._editor.onDidScrollChange(() => { - const sel = this._currentSelection; + const sel = selection.get(); if (!sel) { return; }