diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectMultiword.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectMultiword.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/lldb/source/Commands/CommandObjectMultiword.cpp b/lldb/source/Commands/CommandObjectMultiword.cpp index ecc73a8cbe9..a223d709535 100644 --- a/lldb/source/Commands/CommandObjectMultiword.cpp +++ b/lldb/source/Commands/CommandObjectMultiword.cpp @@ -201,20 +201,22 @@ void CommandObjectMultiword::HandleCompletion(CompletionRequest &request) { } } } - } else { - StringList new_matches; - CommandObject *sub_command_object = GetSubcommandObject(arg0, &new_matches); - if (sub_command_object == nullptr) { - request.AddCompletions(new_matches); - } else { - // Remove the one match that we got from calling GetSubcommandObject. - new_matches.DeleteStringAtIndex(0); - request.AddCompletions(new_matches); - request.GetParsedLine().Shift(); - request.SetCursorIndex(request.GetCursorIndex() - 1); - return sub_command_object->HandleCompletion(request); - } + return; } + + StringList new_matches; + CommandObject *sub_command_object = GetSubcommandObject(arg0, &new_matches); + if (sub_command_object == nullptr) { + request.AddCompletions(new_matches); + return; + } + + // Remove the one match that we got from calling GetSubcommandObject. + new_matches.DeleteStringAtIndex(0); + request.AddCompletions(new_matches); + request.GetParsedLine().Shift(); + request.SetCursorIndex(request.GetCursorIndex() - 1); + sub_command_object->HandleCompletion(request); } const char *CommandObjectMultiword::GetRepeatCommand(Args ¤t_command_args, |