From 0ba85fdb4f51cdbf02f2149d9abde8238ce76a0f Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Wed, 25 Sep 2019 12:04:48 +0000 Subject: [PATCH] [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. llvm-svn: 372851 --- lldb/source/Interpreter/Options.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lldb/source/Interpreter/Options.cpp b/lldb/source/Interpreter/Options.cpp index 3c9c5f7..e5fa84f 100644 --- a/lldb/source/Interpreter/Options.cpp +++ b/lldb/source/Interpreter/Options.cpp @@ -720,11 +720,8 @@ bool Options::HandleOptionCompletion(CompletionRequest &request, } 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 { -- 2.7.4