aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblasty <blasty@local>2026-07-23 22:43:50 +0200
committerblasty <blasty@local>2026-07-23 22:43:50 +0200
commitb8240ddf4af934f2afff896b497ac4c639c0d1ab (patch)
tree7533aac26b4754965b843c344a5df6953ed19f32
parentnav: jumping from the decompiler stays in the decompiler (diff)
downloadida-tui-b8240ddf4af934f2afff896b497ac4c639c0d1ab.tar.gz
ida-tui-b8240ddf4af934f2afff896b497ac4c639c0d1ab.tar.xz
ida-tui-b8240ddf4af934f2afff896b497ac4c639c0d1ab.zip
fix: Tab back from a decomp jump returns to the listing cleanly
Regression from the decomp-jump feature: _open_decomp_entry clears _decomp_return, so Tab out of a jumped-to pseudocode view hit the fallback that just re-showed the (stale) listing widget WITHOUT reopening it and left _cur.view == "decomp". Two visible symptoms: * the listing showed the wrong/old function, and * a subsequent rename ran _reload_active_code -> _open_entry(cur), which saw view == "decomp" and bounced back into the decompiler; the rename also appeared not to propagate (you were looking at stale pseudocode). Fixes: * Tab from decomp with no F5 snapshot now opens the listing at the current pseudocode line's address (a real listing view, _cur.view = "listing"), so the correct function shows. * _reload_active_code forces _cur.view = "listing" when refreshing the listing, keeping the entry consistent with what's on screen. Verified: F5 -> follow ref in decomp -> Tab -> listing shows the TARGET function; renaming a label there stays in the listing and reflects the new name (RELABELED: and 'jnz RELABELED'). view_toggle/decomp_nav/decomp_follow_self/ follow_xrefs/xref_labels/rename/rename_history/disasm_nav/search/mouse/ listing_view/continuous_view/func_banners 70/0.
-rw-r--r--idatui/app.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/idatui/app.py b/idatui/app.py
index 6c1d679..e06d2c8 100644
--- a/idatui/app.py
+++ b/idatui/app.py
@@ -2608,10 +2608,18 @@ class IdaTui(App):
self._decomp_return = None
if ret is not None:
self._cur = ret
- self._active = "listing"
- if ret is not None:
+ self._active = "listing"
self._open_entry(ret, push=False)
+ elif self._cur is not None:
+ # No F5 snapshot (we arrived via a decomp navigation): open the
+ # listing at the current pseudocode line's address, as a real listing
+ # view — otherwise we'd show a stale widget with _cur.view still
+ # "decomp", and the next edit would bounce back to the decompiler.
+ dec = self.query_one(DecompView)
+ ea = dec._line_ea(dec.cursor)
+ self._goto_ea(ea if ea is not None else self._cur.ea, push=False)
else:
+ self._active = "listing"
self._show_active()
@work(thread=True, group="nav")
@@ -3085,6 +3093,7 @@ class IdaTui(App):
self._show_active()
else:
self._save_current_pos()
+ cur.view = "listing" # we're in the listing; keep the entry consistent
self._open_entry(cur, push=False)
def _after_comment(self, ea: int, text: str) -> None: