vim: Better jump list support (#33495)

Closes #23527
Closes #30183
Closes some Discord chats

Release Notes:

- vim: Motions now push to the jump list using the same logic as vim
(i.e.
`G`/`g g`/`g d` always do, but `j`/`k` always don't). Most non-vim
actions
(including clicking with the mouse) continue to push to the jump list
only
  when they move the cursor by 10 or more lines.
This commit is contained in:
Conrad Irwin 2025-06-26 21:25:07 -06:00 committed by GitHub
parent ba1c05abf2
commit 20a3e613b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 147 additions and 19 deletions

View file

@ -778,7 +778,7 @@ impl Item for Editor {
fn deactivated(&mut self, _: &mut Window, cx: &mut Context<Self>) {
let selection = self.selections.newest_anchor();
self.push_to_nav_history(selection.head(), None, true, cx);
self.push_to_nav_history(selection.head(), None, true, false, cx);
}
fn workspace_deactivated(&mut self, _: &mut Window, cx: &mut Context<Self>) {