diff options
| author | blasty <blasty@local> | 2026-07-24 00:12:47 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-24 00:12:47 +0200 |
| commit | 00efd6ab160c99239a7cacd81b6cf010c4b9ae18 (patch) | |
| tree | 1f109216610611f556d132daab30b34f584a9670 | |
| parent | nav: land the decompiler cursor on the function name, not column 0 (diff) | |
| download | ida-tui-00efd6ab160c99239a7cacd81b6cf010c4b9ae18.tar.gz ida-tui-00efd6ab160c99239a7cacd81b6cf010c4b9ae18.tar.xz ida-tui-00efd6ab160c99239a7cacd81b6cf010c4b9ae18.zip | |
nav: xref jump into pseudocode lands on the referenced symbol, not column 0
The decompiler-jump column fix used fn.name (the target's containing function),
which is correct when jumping to a function's own prototype but wrong for an
xref jump to a call SITE: the token on that line is the symbol xrefs was invoked
on, not the enclosing function. So x-pane jumps landed at column 0.
Use focus_name (the xref's subject, already threaded through _goto_ea) as the
token for a mid-function target; keep fn.name for the ea == fn.addr (prototype)
case.
Verified: xrefs to sub_2060 -> pick the caller site -> lands in sub_20DD's
pseudocode on ' sub_2060(a2);' with cursor_x=4 = 'sub_2060'. Full suite
(disasm_nav/view_toggle/search/follow_xrefs/xref_labels/mouse/decomp_nav/
decomp_follow_self/rename/rename_history/listing_view/continuous_view/
func_banners) green.
| -rw-r--r-- | idatui/app.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/idatui/app.py b/idatui/app.py index beb1d47..57ee5c9 100644 --- a/idatui/app.py +++ b/idatui/app.py @@ -3577,9 +3577,13 @@ class IdaTui(App): # Jumping to the function itself: land on its name in the # prototype (line 0), not column 0. dec_idx = 0 + token = fn.name else: + # A mid-function site (e.g. an xref jump to a call site): + # land on the referenced symbol on that line, not column 0. dec_idx = max(self._decomp_line_for(fn.addr, ea), 0) - col = self._decomp_col_for(fn.addr, dec_idx, fn.name) + token = focus_name or fn.name + col = self._decomp_col_for(fn.addr, dec_idx, token) if token else 0 self.app.call_from_thread( self._open_decomp_entry, fn.addr, fn.name, dec_idx, col, push) return |
