diff --git a/plugins/builtin/source/content/views/view_hex_editor.cpp b/plugins/builtin/source/content/views/view_hex_editor.cpp index 73232a0f8..333c35f7f 100644 --- a/plugins/builtin/source/content/views/view_hex_editor.cpp +++ b/plugins/builtin/source/content/views/view_hex_editor.cpp @@ -38,26 +38,31 @@ namespace hex::plugin::builtin { class PopupGoto : public ViewHexEditor::Popup { public: void draw(ViewHexEditor *editor) override { + bool updateAddress = false; if (ImGui::BeginTabBar("goto_tabs")) { if (ImGui::BeginTabItem("hex.builtin.view.hex_editor.goto.offset.absolute"_lang)) { m_mode = Mode::Absolute; + updateAddress = true; ImGui::EndTabItem(); } ImGui::BeginDisabled(!editor->isSelectionValid()); if (ImGui::BeginTabItem("hex.builtin.view.hex_editor.goto.offset.relative"_lang)) { m_mode = Mode::Relative; + updateAddress = true; ImGui::EndTabItem(); } ImGui::EndDisabled(); if (ImGui::BeginTabItem("hex.builtin.view.hex_editor.goto.offset.begin"_lang)) { m_mode = Mode::Begin; + updateAddress = true; ImGui::EndTabItem(); } if (ImGui::BeginTabItem("hex.builtin.view.hex_editor.goto.offset.end"_lang)) { m_mode = Mode::End; + updateAddress = true; ImGui::EndTabItem(); } @@ -65,7 +70,12 @@ namespace hex::plugin::builtin { ImGui::SetKeyboardFocusHere(); m_requestFocus = false; } + if (ImGuiExt::InputTextIcon("##input", ICON_VS_SYMBOL_OPERATOR, m_input)) { + updateAddress = true; + } + + if (updateAddress) { if (auto result = m_evaluator.evaluate(m_input); result.has_value()) { const auto inputResult = u64(result.value()); auto provider = ImHexApi::Provider::get();