Skip to content

Fix invalid outline navigation in search editor#317261

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-invalid-outline-search-editor
Draft

Fix invalid outline navigation in search editor#317261
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-invalid-outline-search-editor

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 19, 2026

Clicking an outline entry for a search editor opened a new tab and failed with Unable to resolve resource search-editor:#0.<random>. The search editor's underlying text model uses an internal search-editor: URI that has no resource-based editor resolver (only the .code-search file extension is registered), so DocumentSymbolsOutline.reveal could not round-trip through IEditorService.openEditor.

Changes

  • documentSymbolsOutline.ts: In reveal, when the outline's model URI matches the source editor's current model and the user isn't requesting side-by-side, apply the selection in place on this._editor instead of delegating to ICodeEditorService.openCodeEditor. This mirrors the existing in-place special case used by CodeEditorService.doOpenCodeEditorFromDiff for diff editors and avoids resolving a resource that the editor service cannot open.
if (!sideBySide && isEqual(this._editor.getModel()?.uri, model.uri)) {
    this._editor.setSelection(selection);
    this._editor.revealRangeNearTopIfOutsideViewport(selection, ScrollType.Smooth);
    this._editor.focus();
    return;
}

Side-by-side opens and cross-editor navigation paths are unchanged.

Copilot AI requested review from Copilot and removed request for Copilot May 19, 2026 07:17
Copilot AI linked an issue May 19, 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 19, 2026 07:25
Copilot AI changed the title [WIP] Fix invalid outline in search editor Fix invalid outline navigation in search editor May 19, 2026
Copilot AI requested a review from dmitrivMS May 19, 2026 07:26
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.

Invalid outline in search editor

2 participants