summaryrefslogtreecommitdiff
path: root/source/Interpreter/CommandObject.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-08-02 17:33:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-08-02 17:33:54 +0000
commit39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (patch)
tree37fd694b2fe544b0ccefb369794632592d138dde /source/Interpreter/CommandObject.cpp
parentf73363f1dd94996356cefbf24388f561891acf0b (diff)
Diffstat (limited to 'source/Interpreter/CommandObject.cpp')
-rw-r--r--source/Interpreter/CommandObject.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/Interpreter/CommandObject.cpp b/source/Interpreter/CommandObject.cpp
index 07be9139f219..324b0b511220 100644
--- a/source/Interpreter/CommandObject.cpp
+++ b/source/Interpreter/CommandObject.cpp
@@ -267,7 +267,6 @@ int CommandObject::HandleCompletion(CompletionRequest &request) {
if (WantsRawCommandString() && !WantsCompletion()) {
// FIXME: Abstract telling the completion to insert the completion
// character.
- request.GetMatches().Clear();
return -1;
} else {
// Can we do anything generic with the options?
@@ -282,7 +281,7 @@ int CommandObject::HandleCompletion(CompletionRequest &request) {
bool handled_by_options = cur_options->HandleOptionCompletion(
request, opt_element_vector, GetCommandInterpreter());
if (handled_by_options)
- return request.GetMatches().GetSize();
+ return request.GetNumberOfMatches();
}
// If we got here, the last word is not an option or an option argument.