diff options
| author | user <user@clank> | 2026-08-01 15:50:11 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-01 15:50:11 +0200 |
| commit | 6d87b75e7686875598ba49f4223d7e2be5a9e241 (patch) | |
| tree | f35300623dc291cd1b6c848bffade6570b6c934f /tools | |
| parent | rpc: a navigation that timed out reported success and corrupted the next edit (diff) | |
| download | ida-tui-6d87b75e7686875598ba49f4223d7e2be5a9e241.tar.gz ida-tui-6d87b75e7686875598ba49f4223d7e2be5a9e241.tar.xz ida-tui-6d87b75e7686875598ba49f4223d7e2be5a9e241.zip | |
rpc: comments are instant and newlines no longer vanish
Two fixes to the comment verb:
Drop the per-character typing delay. Rename/retype/goto use a 35 ms delay for
the visual effect (the agent's keystrokes appear one by one on the livestream),
but comments can be long — a 200-char annotation blocked the driver for 7 s of
pure animation. Comments now type instantly (delay=0); the aesthetic delay is
kept for rename, retype and goto where values are short.
Escape literal newlines before injecting into the prompt. The Input widget is
single-line, so a real 0x0a sent as a keystroke was silently swallowed. The
app's _do_comment already converts the two-char sequence '\\n' into a real
newline for IDA, so the RPC layer now does text.replace('\\n', '\\\\n')
before typing — both literal newlines from the caller and explicit \\n in the
text reach IDA as multi-line comments (each line gets its own // prefix in the
decompiler).
Verified on a live pane: a comment with an embedded newline now renders as two
// lines in the pseudocode, and long comments appear without the multi-second
typing pause.
tests/test_scenarios.py: 212 passed, 0 failed.
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions
