From e81584eb36bb15bc07130a76c6e541f29a8e3a57 Mon Sep 17 00:00:00 2001 From: blasty Date: Fri, 10 Jul 2026 16:43:32 +0200 Subject: app: multi-line comments via literal \\n (long notes were clipping) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The comment prompt is single-line, so a long note rendered as one giant '//' line that ran off the right edge and got clipped. Interpret a literal '\\n' (backslash-n) in the comment text as a real newline in _do_comment (the single choke point for the ';' prompt and the RPC 'comment' verb) — Hex-Rays renders each as its own '//' line. Verified live and locked in the comment_func scenario (multi-line render); suite 104 green. --- idatui/app.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'idatui/app.py') diff --git a/idatui/app.py b/idatui/app.py index 8fc259e..d7bc390 100644 --- a/idatui/app.py +++ b/idatui/app.py @@ -2413,6 +2413,10 @@ class IdaTui(App): @work(thread=True, exclusive=True, group="comment") def _do_comment(self, ea: int, text: str) -> None: assert self.program is not None + # The prompt is single-line, so a literal '\n' (backslash-n) means a real + # newline — Hex-Rays renders each as its own '//' line. Lets long notes + # wrap instead of running off the right edge and clipping. + text = text.replace("\\n", "\n") try: res = self.program.set_comment(ea, text) except IDAToolError as e: -- cgit v1.3.1-sl0p