Skip to content

Fix outline view double-click not jumping when openMode is doubleClick#316829

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-double-click-symbol-jump
Draft

Fix outline view double-click not jumping when openMode is doubleClick#316829
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-double-click-symbol-jump

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 17, 2026

When workbench.list.openMode is set to doubleClick, double-clicking an entry in the Outline view selects the symbol's full range in the editor (e.g. the entire function body) instead of jumping the cursor to it.

Root cause

OutlinePane's tree.onDidOpen handler forwards isDoubleClick directly as the select argument to IOutline.reveal(...). For DocumentSymbolsOutline, that flag switches the editor selection between the symbol's full range and a collapsed cursor at the start of its selectionRange. In the default singleClick mode this is fine — single-click jumps, double-click selects the range. In doubleClick mode, single clicks no longer fire onDidOpen at all, so a double-click is the user's normal "open" gesture but still triggers the full-range selection.

Change

  • In src/vs/workbench/contrib/outline/browser/outlinePane.ts, gate the "select symbol range" behavior on openMode === 'singleClick'. When openMode=doubleClick, double-click now jumps to the symbol position, matching the default-mode single-click behavior.
const isDoubleClick = e.browserEvent?.type === 'dblclick';
const openOnSingleClick = this.configurationService.getValue('workbench.list.openMode') !== 'doubleClick';
const selectSymbolRange = isDoubleClick && openOnSingleClick;
...
await newOutline.reveal(e.element, e.editorOptions, e.sideBySide, selectSymbolRange);

Copilot AI requested review from Copilot and removed request for Copilot May 17, 2026 01:30
Copilot AI linked an issue May 17, 2026 that may be closed by this pull request
Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 17, 2026 01:36
Copilot AI changed the title [WIP] Fix issue with double-clicking symbol not jumping correctly Fix outline view double-click not jumping when openMode is doubleClick May 17, 2026
Copilot AI requested a review from dmitrivMS May 17, 2026 01:37
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.

Double-clicking the symbol from outline does not jump correctly

2 participants