Skip to content

Commit fcb37a1

Browse files
authored
Merge pull request #1428 from Teemperor/cherry/3faec833760fa7ab6e3180378da8c8fb4abbdb11
Cherry-pick [lldb] Fix missing characters when autocompleting LLDB commands in REPL
2 parents ac83e27 + 3f0e7dd commit fcb37a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lldb/source/Expression/REPL.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,10 @@ void REPL::IOHandlerComplete(IOHandler &io_handler,
452452
debugger.GetCommandInterpreter().HandleCompletion(sub_request);
453453
StringList matches, descriptions;
454454
sub_result.GetMatches(matches);
455+
// Prepend command prefix that was excluded in the completion request.
456+
if (request.GetCursorIndex() == 0)
457+
for (auto &match : matches)
458+
match.insert(0, 1, ':');
455459
sub_result.GetDescriptions(descriptions);
456460
request.AddCompletions(matches, descriptions);
457461
return;

0 commit comments

Comments
 (0)