diff options
| author | blasty <blasty@local> | 2026-07-09 14:23:40 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-09 14:23:40 +0200 |
| commit | aa6066117095c375e2037f59f11ec22856d26e09 (patch) | |
| tree | 1e9503dc364bfb2718fa00ce32f708dae127db76 /tests | |
| parent | mouse: click to place cursor, double-click to follow (diff) | |
| download | ida-tui-aa6066117095c375e2037f59f11ec22856d26e09.tar.gz ida-tui-aa6066117095c375e2037f59f11ec22856d26e09.tar.xz ida-tui-aa6066117095c375e2037f59f11ec22856d26e09.zip | |
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').
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_tui.py | 7 |
1 files changed, 7 insertions, 0 deletions
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): |
