aboutsummaryrefslogtreecommitdiffstats
path: root/idatui
diff options
context:
space:
mode:
Diffstat (limited to 'idatui')
-rw-r--r--idatui/app.py4
1 files changed, 4 insertions, 0 deletions
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: