Tinker
Tinker

Reputation: 4535

VSCode Navigate Back local to current file only?

Is there an option in VSCode to limit "navigate back" such that it only takes you back to where you cursor was last in your current file?

This is the current behavior:

  1. (On file A) open method foo
  2. (On file A) open method bar
  3. (On file B) open method baz
  4. (On file A) open method bor

If I navigate back when I am on bor, my cursor will land on baz in file B.

Will it be possible to change this such that I land on bar in file A in stead?

Upvotes: 8

Views: 604

Answers (1)

Mark
Mark

Reputation: 181060

From the issue cited below:

Added a new setting workbench.editor.navigationScope that can be configured to editor to limit navigation actions such as "Go back" and "Go forward" to the current active editor group.

workbench.editor.navigationScope

Should be in v1.65.


This functionality doesn't exist, see open issue: Have a history per editor for in-editor navigation.

However, in some cases like your simple example, Cursor Undo ,Ctrl+U, will work as you want. But it is pretty limited. Upvote the issue.

Upvotes: 6

Related Questions