diff --git a/plugins/builtin/source/content/views/view_hex_editor.cpp b/plugins/builtin/source/content/views/view_hex_editor.cpp index 3ffb0c87f..463e28252 100644 --- a/plugins/builtin/source/content/views/view_hex_editor.cpp +++ b/plugins/builtin/source/content/views/view_hex_editor.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include "math_evaluator.hpp" @@ -105,8 +104,10 @@ namespace hex::plugin::builtin { if (ImGui::BeginTabBar("##find_tabs")) { if (ImGui::BeginTabItem("hex.builtin.view.hex_editor.search.hex"_lang)) { if (ImGui::InputText("##input", this->m_input, ImGuiInputTextFlags_EnterReturnsTrue | ImGuiInputTextFlags_AutoSelectAll | ImGuiInputTextFlags_CharsHexadecimal)) { - this->m_shouldSearch = true; - this->m_backwards = false; + if (!this->m_input.empty()) { + this->m_shouldSearch = true; + this->m_backwards = false; + } } this->drawButtons(); @@ -120,8 +121,10 @@ namespace hex::plugin::builtin { if (ImGui::BeginTabItem("hex.builtin.view.hex_editor.search.string"_lang)) { if (ImGui::InputText("##input", this->m_input, ImGuiInputTextFlags_EnterReturnsTrue | ImGuiInputTextFlags_AutoSelectAll)) { - this->m_shouldSearch = true; - this->m_backwards = false; + if (!this->m_input.empty()) { + this->m_shouldSearch = true; + this->m_backwards = false; + } } this->drawButtons();