mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
fix: Pattern Editor console scroll jumping. (#2029)
Some issues related to the padding added to scroll past the end for console that has padding added. Added a shortcut to scroll editors one pixel at a time. Fixed whole lines always drawn at the top even if scroll value is chosen so that only a portion of the top line is visible. This caused errors in horizontal scrolling. Fixed Ctrl-F Ctrl-G and Ctrl-H messing the editor display. Fixed the end of the line could not be clicked with mouse Fixed line numbers and their lines could be displayed at different heights. Made numbers that represented lines floats instead of integers to allow partial line display.
This commit is contained in:
@@ -1014,6 +1014,8 @@
|
||||
"hex.builtin.view.pattern_editor.shortcut.move_word_right": "Move Cursor One Word to the Right",
|
||||
"hex.builtin.view.pattern_editor.shortcut.move_up": "Move Cursor One Line Up",
|
||||
"hex.builtin.view.pattern_editor.shortcut.move_down": "Move Cursor One Line Down",
|
||||
"hex.builtin.view.pattern_editor.shortcut.move_pixel_up": "Move Cursor One Pixel Up",
|
||||
"hex.builtin.view.pattern_editor.shortcut.move_pixel_down": "Move Cursor One Pixel Down",
|
||||
"hex.builtin.view.pattern_editor.shortcut.move_page_up": "Move Cursor One Page Up",
|
||||
"hex.builtin.view.pattern_editor.shortcut.move_page_down": "Move Cursor One Page Down",
|
||||
"hex.builtin.view.pattern_editor.shortcut.move_home": "Move Cursor to the Start of the Line",
|
||||
|
||||
@@ -2513,6 +2513,11 @@ namespace hex::plugin::builtin {
|
||||
editor->MoveUp(1, false);
|
||||
});
|
||||
|
||||
ShortcutManager::addShortcut(this, ALT + Keys::Up + AllowWhileTyping, "hex.builtin.view.pattern_editor.shortcut.move_pixel_up", [this] {
|
||||
if (auto editor = getEditorFromFocusedWindow(); editor != nullptr)
|
||||
editor->MoveUp(-1, false);
|
||||
});
|
||||
|
||||
ShortcutManager::addShortcut(this, Keys::PageUp + AllowWhileTyping, "hex.builtin.view.pattern_editor.shortcut.move_page_up", [this] {
|
||||
if (auto editor = getEditorFromFocusedWindow(); editor != nullptr)
|
||||
editor->MoveUp(editor->GetPageSize()-4, false);
|
||||
@@ -2523,6 +2528,11 @@ namespace hex::plugin::builtin {
|
||||
editor->MoveDown(1, false);
|
||||
});
|
||||
|
||||
ShortcutManager::addShortcut(this, ALT+ Keys::Down + AllowWhileTyping, "hex.builtin.view.pattern_editor.shortcut.move_pixel_down", [this] {
|
||||
if (auto editor = getEditorFromFocusedWindow(); editor != nullptr)
|
||||
editor->MoveDown(-1, false);
|
||||
});
|
||||
|
||||
ShortcutManager::addShortcut(this, Keys::PageDown + AllowWhileTyping, "hex.builtin.view.pattern_editor.shortcut.move_page_down", [this] {
|
||||
if (auto editor = getEditorFromFocusedWindow(); editor != nullptr)
|
||||
editor->MoveDown(editor->GetPageSize()-4, false);
|
||||
|
||||
Reference in New Issue
Block a user