feat: Add keyboard shortcuts to jump to the prev/next differences in diff view (#2445)

Adds keyboard shortcuts (currently `n` and `N`) in the diffing plugin
view to jump to the next/prev difference in the list.

IMPORTANT NOTE: Depends on changes made in a library submodule. [This
PR](https://github.com/WerWolv/libwolv/pull/34) must be accepted first.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
This commit is contained in:
Zackary Newman
2025-09-21 04:39:37 -04:00
committed by GitHub
parent fedbce6f9e
commit 3c167c3306
5 changed files with 121 additions and 7 deletions

View File

@@ -1345,7 +1345,8 @@ namespace hex::plugin::builtin {
/* Skip until */
ContentRegistry::UserInterface::addMenuItemSubMenu({ "hex.builtin.menu.file", "hex.builtin.view.hex_editor.menu.file.skip_until" }, ICON_VS_DEBUG_STEP_OVER, 1610,
[]{},
canSearchForDifferingByte);
canSearchForDifferingByte,
this);
/* Skip until previous differing byte */
ContentRegistry::UserInterface::addMenuItem({
@@ -1384,7 +1385,8 @@ namespace hex::plugin::builtin {
ui::ToastInfo::open("hex.builtin.view.hex_editor.menu.file.skip_until.beginning_reached"_lang);
}
},
canSearchForDifferingByte);
canSearchForDifferingByte,
this);
/* Skip until next differing byte */
ContentRegistry::UserInterface::addMenuItem({
@@ -1423,7 +1425,8 @@ namespace hex::plugin::builtin {
ui::ToastInfo::open("hex.builtin.view.hex_editor.menu.file.skip_until.end_reached"_lang);
}
},
canSearchForDifferingByte);
canSearchForDifferingByte,
this);
ContentRegistry::UserInterface::addMenuItemSeparator({ "hex.builtin.menu.edit" }, 1100, this);