[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 Jun 25 11:54:28 PDT 2020


gedatsu217 marked an inline comment as done.
gedatsu217 added inline comments.


================
Comment at: lldb/source/Host/common/Editline.cpp:1017
+          el_insertstr(m_editline, to_add.c_str());
+          return CC_REFRESH;
+        }
----------------
teemperor wrote:
> If I understand the only effect this whole code has is to return CC_REFRESH instead of CC_REDISPLAY? If yes, then I think you can just replace the `break` below with `return CC_REFRESH;` which will be much simpler.
> If yes, then I think you can just replace the break below with return CC_REFRESH; which will be much simpler.

Isn't it "return CC_REDISPLAY", not "CC_REFRESH"? I want to return CC_REFRESH only when "to_add" is in "to_add_autosuggestion" (e.g. to_add = b, to_add_autosuggestion = "breakpoint").  

That is because CC_REDISPLAY deletes the gray-colored autosuggested part, while CC_REFRESH leaves it.




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

https://reviews.llvm.org/D81001





More information about the lldb-commits mailing list