Skip to content

[Navigation] Incorrect positioning after Go Back and subsequent navigation #15191

@zhangzejun123

Description

@zhangzejun123

Problem Description:
While developing a VS Code extension project in Theia, encountered an issue with incorrect code navigation positioning:

  1. Ctrl+click on workspace at line 17 in extension.ts
  2. Correctly jumps to line 13612 in index.d.ts (expected)
  3. Use Go Back (Alt+Left) to return
  4. Ctrl+click on workspaceFolders
  5. Still jumps to line 13612 in index.d.ts (unexpected, should navigate to new location)

VS Code handles this scenario correctly with proper navigation.

Reproduction Steps:

  1. Create a VS Code extension project with workspace-related APIs
  2. Add the following code in extension.ts:const folders = vscode.workspace.workspaceFolders; // Line 17
  3. Perform the described navigation sequence

Expected Behavior:
Each navigation should locate the latest definition position of the target symbol

Actual Behavior:
Subsequent navigation repeats previous positioning (line 13612)

Environment:

  • Operating System: windows10
  • Theia Version: 1.59.1

Attachments: Screen recording:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions