[Lldb-commits] [PATCH] D81001: [lldb] Display autosuggestion part in gray if there is one possible suggestion

Shu Anzai via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 6 02:46:44 PDT 2020


gedatsu217 added a comment.

> So the way the issue with the single space is now solved is by doing CC_REDISPLAY when we're only adding the single space? Isn't that also deleting the whole autosuggestion?

Yes. CC_REDISPLAY can delete all the gray characters left.



================
Comment at: lldb/source/Host/common/Editline.cpp:1081
+    if (spaces_to_print > 0) {
+      std::string spaces = std::string((int)spaces_to_print, ' ');
+      fputs(spaces.c_str(), m_output_file);
----------------
teemperor wrote:
> The `(int)` cast isn't necessary.
I found that lldb crashed. Sorry, I should have checked more when I uploaded this.

I use spaces_to_print as size_t, but this sometimes becomes less than zero. So, I have to use this as int.




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81001/new/

https://reviews.llvm.org/D81001



More information about the lldb-commits mailing list