From d3e47245d6e84b5ea1976cd0880d70bd5e995a45 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Wed, 13 Jan 2021 14:11:02 +0100 Subject: [PATCH] Improved memory region highlighting through selection --- external/ImGui/include/imgui_memory_editor.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/external/ImGui/include/imgui_memory_editor.h b/external/ImGui/include/imgui_memory_editor.h index 916b6d98a..f78dc960f 100644 --- a/external/ImGui/include/imgui_memory_editor.h +++ b/external/ImGui/include/imgui_memory_editor.h @@ -345,7 +345,10 @@ struct MemoryEditor { ImVec2 pos = ImGui::GetCursorScreenPos(); float highlight_width = s.GlyphWidth * 2; - bool is_next_byte_highlighted = (addr + 1 < mem_size) && ((HighlightMax != (size_t)-1 && addr + 1 < HighlightMax) || (HighlightFn && HighlightFn(mem_data, addr + 1, true))); + bool is_next_byte_highlighted = (addr + 1 < mem_size) && + ((HighlightMax != (size_t)-1 && addr + 1 < HighlightMax) || + (HighlightFn && HighlightFn(mem_data, addr + 1, true)) || + ((addr + 1) >= DataPreviewAddr && (addr + 1) <= DataPreviewAddrEnd) || ((addr + 1) >= DataPreviewAddrEnd && (addr + 1) <= DataPreviewAddr)); if (is_next_byte_highlighted) { highlight_width = s.HexCellWidth;