Skip to content

Outline: Shift+click to select the symbol's full range#317262

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/shift-click-select-outline-item
Draft

Outline: Shift+click to select the symbol's full range#317262
Copilot wants to merge 2 commits into
mainfrom
copilot/shift-click-select-outline-item

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 19, 2026

Adds Shift+click on an Outline view item as a shortcut for selecting the symbol's full range (function body, variable declaration, etc.) in the editor. Previously, this was only available via double-click, which also moves focus to the editor.

Changes

  • outlinePane.ts: In the tree's onDidOpen handler, detect Shift+click via dom.isMouseEvent(e.browserEvent) && e.browserEvent.shiftKey and pass select=true to IOutline.reveal(...) for both double-click and Shift+click. The flag flows through DocumentSymbolsOutline.reveal to select symbol.range instead of collapsing to the symbol's selection range. No conflict with tree multi-select since the outline tree sets multipleSelectionSupport: false.
const isDoubleClick = e.browserEvent?.type === 'dblclick';
const isShiftClick = dom.isMouseEvent(e.browserEvent) && e.browserEvent.shiftKey;
...
await newOutline.reveal(e.element, e.editorOptions, e.sideBySide, isDoubleClick || isShiftClick);

Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 19, 2026 07:24
Copilot AI changed the title [WIP] Add Shift + click functionality to select related code in Outline view Outline: Shift+click to select the symbol's full range May 19, 2026
Copilot AI requested a review from dmitrivMS May 19, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shift + click the item in Outline view to select the related code (function, var...)

2 participants