Skip to content

Commit 3b8f0a0

Browse files
authored
Merge pull request #1905 from ffgriever-pl/fix-set-scroll
Fix invalid set scroll position in memory editor.
2 parents 82587ee + 25ac3fa commit 3b8f0a0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

third_party/imgui_memory_editor/imgui_memory_editor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,11 @@ void MemoryEditor::DrawOptionsLine(const Sizes& s, void* mem_data_void, size_t m
406406
if (GotoAddr != (size_t)-1) {
407407
if (GotoAddr < mem_size) {
408408
ImGui::BeginChild("##scrolling");
409+
if (PushMonoFont) PushMonoFont();
409410
ImGui::SetScrollFromPosY(
410411
ImGui::GetCursorStartPos().y +
411412
(GotoAddr / Cols) * ImGui::GetTextLineHeight());
413+
if (PushMonoFont) ImGui::PopFont();
412414
ImGui::EndChild();
413415
DataEditingAddr = DataPreviewAddr = GotoAddr;
414416
DataEditingTakeFocus = true;

0 commit comments

Comments
 (0)