labath added a comment.
Thanks.
When trying this out I did notice one subtle bug related to backspacing. When
backspacing over the first character, the command line does not get redrawn,
which means the autosuggested text remains on screen. The "deleted" character
also remains, and is printed in normal colour, though this is very hard to see
(on my terminal) as it is now right under the cursor. Pressing backspace the
second time makes the faint text and both deleted characters disappear. I'll
try to illustrate it using crude ascii art. Initially the command line is (F =
faint, ^ = cursor):
(lldb) help frame
FFFFFF FFFFFFF
^
After the first backspace, the line becomes:
(lldb) help frame
FFFFFF FFFFFFF
^
After the second one:
(lldb) h
FFFFFF
^
I didn't find this effect too disturbing, so I don't think it should be a
blocker for this, but it something to keep an eye on, as it may cause problems
down the road.
Anyway, LGTM from me.
================
Comment at: lldb/test/API/iohandler/autosuggestion/TestAutosuggestion.py:71
+ self.child.send("hel")
+ self.child.expect_exact("\x1b["+ str(len("(lldb) he") + 1) + "G" + "l"
+ faint_color + "p apropos" + reset)
+
----------------
Since you have variables for the faint and reset escape codes, maybe you could
have a function for the cursor movement? `def cursor_horizontal_abs(n): return
"\x1b[" + str(n) + "G"` ?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81001/new/
https://reviews.llvm.org/D81001
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits