Add a way to navigate between changes (#28891)

Closes https://github.com/zed-industries/zed/issues/19731

Adds `editor::GoToPreviousChange` and `editor::GoToNextChange` that work
the same as `vim::ChangeListOlder` and `vim::ChangeListNewer` as the
common logic was extracted and reused.

Release Notes:

- Added a way to navigate between changes with
`editor::GoToPreviousChange` and `editor::GoToNextChange`
This commit is contained in:
Kirill Bulatov 2025-04-16 14:09:17 -06:00 committed by GitHub
parent 64a67a1071
commit 56856fb992
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 178 additions and 67 deletions

View file

@ -435,6 +435,8 @@ impl EditorElement {
register_action(editor, window, Editor::stage_and_next);
register_action(editor, window, Editor::unstage_and_next);
register_action(editor, window, Editor::expand_all_diff_hunks);
register_action(editor, window, Editor::go_to_previous_change);
register_action(editor, window, Editor::go_to_next_change);
register_action(editor, window, |editor, action, window, cx| {
if let Some(task) = editor.format(action, window, cx) {