[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
Tue Jun 16 14:19:06 PDT 2020


gedatsu217 updated this revision to Diff 271146.
gedatsu217 added a comment.

Implementation all ascii characters for TypedCharacter.
Making m_use_autosuggestion in Editline.cpp. (I did not know a way to pass the bool value of IOHandlerEditline to Editline constructor, so I made a function, Editline::UseAutosuggestion, in Editline class. If the autosuggestion is valid, this function is called from IOHandlerEditline constructor. Is this implementation good?)

> You can test it by just doing settings set show-autosuggestion true (which should activate this) and settings set show-autosuggestion true (which should deactivate this). It's fine if LLDB requires a restart to do activate this setting (that's to my knowledge a limitation of the current way the IOHandlers work).

"restart" means that excuting "quit" in LLDB and executing "bin/lldb" again in Terminal?  I made m_use_autosuggestion in Editline.cpp and it goes well when show-autosuggestion is DefaultTrue. However, when show-autosuggestion is DefaultFalse and executing "settings set show-autosuggestion true", autosuggestion does not work well. Do you know what causes it?

In addition,

> There's no way to confirm the autosuggestion. In fish you can use right-arrow or a key to move to the end of the line (END, CTRL-E).

If you press CTRL-F, you probably confirm the autosuggestion.

> The interaction between the autocompletion and autosuggestion is rather confusing. Fish solves this by showing the autocompletion under the current line. I don't we need to take it that far, but at least the the situation described below should work.

I added some codes in TabCommand in Editline.cpp so that autosuggestion still show up after the completion when there is a possible completion.


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

https://reviews.llvm.org/D81001

Files:
  lldb/include/lldb/Core/Debugger.h
  lldb/include/lldb/Core/IOHandler.h
  lldb/include/lldb/Host/Editline.h
  lldb/include/lldb/Interpreter/CommandInterpreter.h
  lldb/source/Core/CoreProperties.td
  lldb/source/Core/Debugger.cpp
  lldb/source/Core/IOHandler.cpp
  lldb/source/Host/common/Editline.cpp
  lldb/source/Interpreter/CommandInterpreter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81001.271146.patch
Type: text/x-patch
Size: 13497 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200616/93830070/attachment-0001.bin>


More information about the lldb-commits mailing list