From aa6066117095c375e2037f59f11ec22856d26e09 Mon Sep 17 00:00:00 2001 From: blasty Date: Thu, 9 Jul 2026 14:23:40 +0200 Subject: preserve cursor line+column in the jump history NavEntry now stores cursor_x too; the top-of-history position is kept current (line + column) on every disasm cursor move, and DisasmView.load restores the column (clamped once the line is cached). So Esc after a jump lands exactly on the symbol you left from, not the line start. pilot suite 37/37 (adds 'back restores the exact line + column'). --- tests/test_tui.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/test_tui.py b/tests/test_tui.py index ef0ffb2..5567eb5 100644 --- a/tests/test_tui.py +++ b/tests/test_tui.py @@ -329,6 +329,13 @@ async def run(db): await wait_until(pilot, lambda: len(app._nav) > depth, timeout=25) check("double-click follows the symbol", app._cur.ea == want, f"cur={app._cur.ea:#x} want={want:#x}") + # Back restores the exact cursor position (line AND column). + await pilot.press("escape") + await wait_until(pilot, lambda: app._cur.ea != want, timeout=20) + await wait_until(pilot, lambda: dis.total > 0 and dis.cursor == mline, timeout=20) + check("back restores the exact line + column", + dis.cursor == mline and dis.word_under_cursor() == msym, + f"cursor={dis.cursor} (want {mline}) word={dis.word_under_cursor()!r}") def main(argv): -- cgit v1.3.1-sl0p