This revision was automatically updated to reflect the committed changes.
Closed by commit rG3faec833760f: [lldb] Fix missing characters when
autocompleting LLDB commands in REPL (authored by poya, committed by teemperor).
Changed prior to commit:
https://reviews.llvm.org/D82835?vs=274322&id=275341#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82835/new/
https://reviews.llvm.org/D82835
Files:
lldb/source/Expression/REPL.cpp
Index: lldb/source/Expression/REPL.cpp
===================================================================
--- lldb/source/Expression/REPL.cpp
+++ lldb/source/Expression/REPL.cpp
@@ -457,6 +457,10 @@
debugger.GetCommandInterpreter().HandleCompletion(sub_request);
StringList matches, descriptions;
sub_result.GetMatches(matches);
+ // Prepend command prefix that was excluded in the completion request.
+ if (request.GetCursorIndex() == 0)
+ for (auto &match : matches)
+ match.insert(0, 1, ':');
sub_result.GetDescriptions(descriptions);
request.AddCompletions(matches, descriptions);
return;
Index: lldb/source/Expression/REPL.cpp
===================================================================
--- lldb/source/Expression/REPL.cpp
+++ lldb/source/Expression/REPL.cpp
@@ -457,6 +457,10 @@
debugger.GetCommandInterpreter().HandleCompletion(sub_request);
StringList matches, descriptions;
sub_result.GetMatches(matches);
+ // Prepend command prefix that was excluded in the completion request.
+ if (request.GetCursorIndex() == 0)
+ for (auto &match : matches)
+ match.insert(0, 1, ':');
sub_result.GetDescriptions(descriptions);
request.AddCompletions(matches, descriptions);
return;
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits