Author: teemperor Date: Wed Sep 25 05:04:48 2019 New Revision: 372851 URL: http://llvm.org/viewvc/llvm-project?rev=372851&view=rev Log: [lldb][NFC] Remove useless cursor shifting in Options::HandleOptionCompletion
The cursor position is always at the end of the current argument (as the argument cut off after the cursor position). So this code is a no-op and can be removed. Modified: lldb/trunk/source/Interpreter/Options.cpp Modified: lldb/trunk/source/Interpreter/Options.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Options.cpp?rev=372851&r1=372850&r2=372851&view=diff ============================================================================== --- lldb/trunk/source/Interpreter/Options.cpp (original) +++ lldb/trunk/source/Interpreter/Options.cpp Wed Sep 25 05:04:48 2019 @@ -720,11 +720,8 @@ bool Options::HandleOptionCompletion(Com } else if (opt_arg_pos == request.GetCursorIndex()) { // Okay the cursor is on the completion of an argument. See if it has a // completion, otherwise return no matches. - - CompletionRequest subrequest = request; - subrequest.SetCursorCharPosition(subrequest.GetCursorArgument().size()); if (opt_defs_index != -1) { - HandleOptionArgumentCompletion(subrequest, opt_element_vector, i, + HandleOptionArgumentCompletion(request, opt_element_vector, i, interpreter); return true; } else { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits