aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblasty <blasty@local>2026-07-24 20:31:50 +0200
committerblasty <blasty@local>2026-07-24 20:31:50 +0200
commit042b2988fbb2ad4e0b2cfff9037f9304ad5a598e (patch)
tree979cabf49b34dde149f110ba4d6077ed45f8a4e4
parentdecomp: prettier 'decompiling' overlay — animated braille spinner (diff)
downloadida-tui-042b2988fbb2ad4e0b2cfff9037f9304ad5a598e.tar.gz
ida-tui-042b2988fbb2ad4e0b2cfff9037f9304ad5a598e.tar.xz
ida-tui-042b2988fbb2ad4e0b2cfff9037f9304ad5a598e.zip
decomp: fix stuck 'decompiling' spinner when re-opening a loaded function
The F5-from-listing overlay fix raises dec.loading=True before _show_active, but _show_active only clears it via _load_decomp when the function needs (re)decompiling. F5 on a function already shown in the pseudocode pane (dec.loaded_ea == cur.ea) took the else branch, which never cleared loading -> the spinner stayed up forever. Clear dec.loading=False in that branch. Pilot view_toggle gains a check: F5 the same cached function again and assert the overlay clears (8/8).
-rw-r--r--idatui/app.py4
-rw-r--r--tests/test_scenarios.py10
2 files changed, 14 insertions, 0 deletions
diff --git a/idatui/app.py b/idatui/app.py
index 5a50683..f098b71 100644
--- a/idatui/app.py
+++ b/idatui/app.py
@@ -4365,6 +4365,10 @@ class IdaTui(App):
dec.loading = True # gray out + 'decompiling…' overlay
self._load_decomp(self._cur.ea, self._cur.name)
else:
+ # Already showing this function: clear any overlay raised by the
+ # F5-from-listing path (no re-decompile happens here, so nothing
+ # else would).
+ dec.loading = False
self._status_for_cur("pseudocode")
# -- hex view ---------------------------------------------------------- #
diff --git a/tests/test_scenarios.py b/tests/test_scenarios.py
index e21226c..39f8d86 100644
--- a/tests/test_scenarios.py
+++ b/tests/test_scenarios.py
@@ -631,6 +631,16 @@ async def s_view_toggle(c: Ctx):
and dec._cover_widget is None, 25)
c.check("overlay clears when the decompile finishes",
not dec.loading and dec._cover_widget is None)
+ # F5 on an ALREADY-loaded function must still clear the overlay (regression:
+ # the F5-raised overlay had nothing to clear it in the 'already loaded' branch
+ # -> spinner stuck forever).
+ await c.press("tab") # -> listing
+ await c.wait(lambda: app._active == "listing", 10)
+ app.action_toggle_view() # F5 the same, cached function again
+ cleared = await c.wait(lambda: app._active == "decomp" and not dec.loading
+ and dec._cover_widget is None, 15)
+ c.check("re-decompiling an already-loaded function clears the overlay", cleared,
+ f"loading={dec.loading} cover={dec._cover_widget!r}")
# line-number gutter
dec.scroll_to(0, 0, animate=False)
await c.pause(0.025)