From b519051ce9ca3f8e0835221643211a8879fd6cd7 Mon Sep 17 00:00:00 2001 From: blasty Date: Sat, 25 Jul 2026 00:20:37 +0200 Subject: split: follow the decomp across functions as the listing cursor crosses bounds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- tests/test_scenarios.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') 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: -- cgit v1.3.1-sl0p