diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectProcess.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index 9deb2e64940..86d477754ea 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -134,20 +134,21 @@ public: ~CommandObjectProcessLaunch() override = default; - int HandleArgumentCompletion(Args &input, int &cursor_index, - int &cursor_char_position, - OptionElementVector &opt_element_vector, - int match_start_point, int max_return_elements, - bool &word_complete, - StringList &matches) override { - std::string completion_str(input.GetArgumentAtIndex(cursor_index)); - completion_str.erase(cursor_char_position); - + int HandleArgumentCompletion( + CompletionRequest &request, + OptionElementVector &opt_element_vector) override { + std::string completion_str( + request.GetParsedLine().GetArgumentAtIndex(request.GetCursorIndex())); + completion_str.erase(request.GetCursorCharPosition()); + + bool word_complete = request.GetWordComplete(); CommandCompletions::InvokeCommonCompletionCallbacks( GetCommandInterpreter(), CommandCompletions::eDiskFileCompletion, - completion_str.c_str(), match_start_point, max_return_elements, nullptr, - word_complete, matches); - return matches.GetSize(); + completion_str.c_str(), request.GetMatchStartPoint(), + request.GetMaxReturnElements(), nullptr, word_complete, + request.GetMatches()); + request.SetWordComplete(word_complete); + return request.GetMatches().GetSize(); } Options *GetOptions() override { return &m_options; } |