From 8fe490ed0385dccc6f38e620e6ee7abe6b508a42 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Tue, 19 Dec 2023 00:03:00 +0100 Subject: [PATCH] fix: Escape to deselect bytes not working --- plugins/builtin/source/content/views/view_hex_editor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/builtin/source/content/views/view_hex_editor.cpp b/plugins/builtin/source/content/views/view_hex_editor.cpp index 1b190c2dd..03cdfe325 100644 --- a/plugins/builtin/source/content/views/view_hex_editor.cpp +++ b/plugins/builtin/source/content/views/view_hex_editor.cpp @@ -774,7 +774,9 @@ namespace hex::plugin::builtin { this->m_selectionStart->reset(); this->m_selectionEnd->reset(); - EventRegionSelected::post(ImHexApi::HexEditor::ProviderRegion{ this->getSelection(), provider }); + this->m_hexEditor.setSelectionUnchecked(std::nullopt, std::nullopt); + + EventRegionSelected::post(ImHexApi::HexEditor::ProviderRegion{ Region::Invalid(), provider }); }); ShortcutManager::addShortcut(this, Keys::Enter, "hex.builtin.view.hex_editor.shortcut.enter_editing", [this] {