aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorblasty <blasty@local>2026-07-25 00:20:37 +0200
committerblasty <blasty@local>2026-07-25 00:20:37 +0200
commitb519051ce9ca3f8e0835221643211a8879fd6cd7 (patch)
tree787ac095df6756f6aeedc161a66a9baa1a385b82 /tests
parentsplit: click a pane to drive it (not just Tab) + spell it out in the status (diff)
downloadida-tui-b519051ce9ca3f8e0835221643211a8879fd6cd7.tar.gz
ida-tui-b519051ce9ca3f8e0835221643211a8879fd6cd7.tar.xz
ida-tui-b519051ce9ca3f8e0835221643211a8879fd6cd7.zip
split: follow the decomp across functions as the listing cursor crosses bounds
The unified listing spans many functions, but the decomp pane was pinned to the one function it was opened on — scrolling the listing cursor past that function's bounds stopped syncing. Now _sync_split tracks the decompiled function's ea span (_split_range, from decomp_map) and, when the listing cursor leaves it, re-points the decomp pane to the function under the cursor: _resync_decomp (exclusive worker) -> function_of(ea) -> _apply_resync re-decompiles + reloads the region map, or just drops the band over data/undefined (keeping the last function). Pilot split_view: moving the listing cursor into another function re-syncs the decomp (18/18).
Diffstat (limited to 'tests')
-rw-r--r--tests/test_scenarios.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_scenarios.py b/tests/test_scenarios.py
index 7d9f3b7..fad54ec 100644
--- a/tests/test_scenarios.py
+++ b/tests/test_scenarios.py
@@ -422,6 +422,19 @@ async def s_split_view(c: Ctx):
app._active == "decomp", f"active={app._active}")
await c.press("tab") # restore listing as the driver
await c.pause(0.1)
+ # cross-function follow: the listing cursor leaving the decompiled function
+ # re-points the decomp pane to whatever function it's now in.
+ await c.wait(lambda: app._split_range is not None, 10)
+ other = c.find_func(lambda f: f.addr != app._cur.ea and f.size > 40)
+ row = lst.model.ensure_ea(other.addr) if other is not None else None
+ if other is not None and row is not None and row >= 0:
+ lst.focus()
+ app._active = "listing"
+ lst.cursor = row
+ app._sync_split("listing") # cursor now outside the decompiled fn
+ followed = await c.wait(lambda: dec.loaded_ea == other.addr, 25)
+ c.check("listing cursor crossing into another function re-syncs the decomp",
+ followed, f"dec={dec.loaded_ea} want={other.addr}")
# navigation in split keeps BOTH panes on the (new) function
nf = c.find_func(lambda f: f.addr != app._cur.ea and f.size > 80)
if nf is not None: