diff options
author | Greg Clayton <gclayton@apple.com> | 2015-02-25 00:32:43 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2015-02-25 00:32:43 +0000 |
commit | 7d1069d09ed6b9c1026132bb1d68952f079e8db7 (patch) | |
tree | c6781cec4ac43ab8d1c3ef594d78241ea5fb99e7 /lldb/source/Commands/CommandObjectMultiword.cpp | |
parent | c609a5927cdd24dcd5ef64c57d73bc9714f3a647 (diff) | |
download | bcm5719-llvm-7d1069d09ed6b9c1026132bb1d68952f079e8db7.tar.gz bcm5719-llvm-7d1069d09ed6b9c1026132bb1d68952f079e8db7.zip |
If you try to auto-complete "target symbols<TAB>" you get "target symbolsadd" instead of "target symbols ".
Fix this by returning the fact that the "symbols" word is complete if there is nothing else to complete after the "symbols" word.
<rdar://problem/19164599>
llvm-svn: 230408
Diffstat (limited to 'lldb/source/Commands/CommandObjectMultiword.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectMultiword.cpp | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/lldb/source/Commands/CommandObjectMultiword.cpp b/lldb/source/Commands/CommandObjectMultiword.cpp index 69b178da46b..d558a068c6b 100644 --- a/lldb/source/Commands/CommandObjectMultiword.cpp +++ b/lldb/source/Commands/CommandObjectMultiword.cpp @@ -251,23 +251,27 @@ CommandObjectMultiword::HandleCompletion &temp_matches); if (cmd_obj != NULL) { - matches.DeleteStringAtIndex (0); - input.Shift(); - cursor_char_position = 0; - input.AppendArgument (""); - return cmd_obj->HandleCompletion (input, - cursor_index, - cursor_char_position, - match_start_point, - max_return_elements, - word_complete, - matches); + if (input.GetArgumentCount() == 1) + { + word_complete = true; + } + else + { + matches.DeleteStringAtIndex (0); + input.Shift(); + cursor_char_position = 0; + input.AppendArgument (""); + return cmd_obj->HandleCompletion (input, + cursor_index, + cursor_char_position, + match_start_point, + max_return_elements, + word_complete, + matches); + } } - else - return matches.GetSize(); } - else - return matches.GetSize(); + return matches.GetSize(); } else { |