mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
fix: Hex editor search buttons not working (#439)
* fix: reset focus only once after window opening * refactor: extract search functions * fix: restore focus after search/goto Co-authored-by: Dmitry Polshakov <dmitry.polshakov@dsr-corporation.com>
This commit is contained in:
@@ -45,6 +45,7 @@ namespace hex::plugin::builtin {
|
||||
std::vector<char> m_searchHexBuffer;
|
||||
SearchFunction m_searchFunction = nullptr;
|
||||
std::vector<std::pair<u64, u64>> *m_lastSearchBuffer;
|
||||
bool m_searchRequested = false;
|
||||
|
||||
i64 m_lastSearchIndex = 0;
|
||||
std::vector<std::pair<u64, u64>> m_lastStringSearch;
|
||||
@@ -52,6 +53,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
u64 m_gotoAddressAbsolute = 0;
|
||||
i64 m_gotoAddressRelative = 0;
|
||||
bool m_gotoRequested = false;
|
||||
|
||||
char m_baseAddressBuffer[0x20] = { 0 };
|
||||
u64 m_resizeSize = 0;
|
||||
@@ -71,6 +73,12 @@ namespace hex::plugin::builtin {
|
||||
bool m_advancedDecodingEnabled = false;
|
||||
|
||||
void drawSearchPopup();
|
||||
void drawSearchInput(std::vector<char> *currBuffer, ImGuiInputTextFlags flags);
|
||||
void performSearch(char *buffer);
|
||||
void performSearchNext();
|
||||
void performSearchPrevious();
|
||||
static int inputCallback(ImGuiInputTextCallbackData *data);
|
||||
|
||||
void drawGotoPopup();
|
||||
void drawEditPopup();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user