aboutsummaryrefslogtreecommitdiffstats
path: root/idatui/rpc.py
diff options
context:
space:
mode:
Diffstat (limited to 'idatui/rpc.py')
-rw-r--r--idatui/rpc.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/idatui/rpc.py b/idatui/rpc.py
index 225aeb2..2a63812 100644
--- a/idatui/rpc.py
+++ b/idatui/rpc.py
@@ -1148,7 +1148,12 @@ class RpcServer:
return await self._press(["tab"], _toggled, timeout, "toggle_view")
if method == "hex":
- return await self._press(["backslash"], lambda: app.is_hex,
+ # Backslash TOGGLES the hex view, so the predicate has to be "the
+ # mode flipped", not "we are in hex". Waiting for is_hex meant the
+ # call that LEAVES hex could never be satisfied and always timed
+ # out -- a driver could open the hex view but never close it.
+ was_hex = app.is_hex
+ return await self._press(["backslash"], lambda: app.is_hex != was_hex,
timeout, "hex")
if method == "graph":
return await self._graph(params, timeout)