diff options
| author | blasty <blasty@local> | 2026-08-07 16:18:17 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-08-07 16:18:17 +0200 |
| commit | a40bebf96c99c24a6965f297fcc6d7bb1cdf7599 (patch) | |
| tree | a8dd76e14d2a3b276b245360fe561d2c3f8e0571 | |
| parent | demo: --here, render the TUI in the terminal that ran the demo (diff) | |
| download | ida-tui-a40bebf96c99c24a6965f297fcc6d7bb1cdf7599.tar.gz ida-tui-a40bebf96c99c24a6965f297fcc6d7bb1cdf7599.tar.xz ida-tui-a40bebf96c99c24a6965f297fcc6d7bb1cdf7599.zip | |
demo: do not re-navigate to main when the app already landed there
The app auto-lands on main once the function index is in, so scene_open typed
a goto to a place it was already standing. Every keystroke a driver injects
costs a round trip, so that was pure dead time at the very start of the tour --
the worst place to spend it, since it is the part a recording opens on.
| -rw-r--r-- | tools/demo.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/demo.py b/tools/demo.py index 2753a60..4508c40 100644 --- a/tools/demo.py +++ b/tools/demo.py @@ -78,9 +78,17 @@ class Demo: # -- scenes ------------------------------------------------------------ # def scene_open(self): """Land on a real function and show the listing.""" - self.say("goto main") - self.do("goto", target="main", delay_ms=TYPE_MS) - self.beat(1.5) + # The app auto-lands on main once the index is in, so typing a goto to + # get there is a redundant round trip -- and every keystroke a driver + # injects costs real time. Only navigate if we are somewhere else. + st = self.do("state") or {} + if ((st.get("function") or {}).get("name")) != "main": + self.say("goto main") + self.do("goto", target="main", delay_ms=TYPE_MS) + self.beat(1.5) + else: + self.say("already landed on main") + self.beat(0.4) self.say("scroll the listing") self.do("move", dir="down", n=12) self.beat(0.8) |
