summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandInterpreter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index c8a64b09526..cb61046e574 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -1756,7 +1756,7 @@ void CommandInterpreter::HandleCompletionMatches(CompletionRequest &request) {
// For any of the command completions a unique match will be a complete word.
- if (request.GetCursorIndex() == -1) {
+ if (request.GetPartialParsedLine().GetArgumentCount() == 0) {
// We got nothing on the command line, so return the list of commands
bool include_aliases = true;
StringList new_matches, descriptions;
@@ -1780,7 +1780,7 @@ void CommandInterpreter::HandleCompletionMatches(CompletionRequest &request) {
new_matches.DeleteStringAtIndex(0);
new_descriptions.DeleteStringAtIndex(0);
request.GetParsedLine().AppendArgument(llvm::StringRef());
- request.SetCursorIndex(request.GetCursorIndex() + 1);
+ request.SetCursorIndex(request.GetCursorIndex() + 1U);
request.SetCursorCharPosition(0);
}
}
OpenPOWER on IntegriCloud