[Lldb-commits] [lldb] 825adbe - [lldb] Don't tab complete stop-hook delete beyond 1st argument

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 11 04:01:18 PDT 2023


Author: David Spickett
Date: 2023-09-11T11:00:57Z
New Revision: 825adbe5585219ce731045defa019defaf96faab

URL: https://github.com/llvm/llvm-project/commit/825adbe5585219ce731045defa019defaf96faab
DIFF: https://github.com/llvm/llvm-project/commit/825adbe5585219ce731045defa019defaf96faab.diff

LOG: [lldb] Don't tab complete stop-hook delete beyond 1st argument

This already applies to enable and disable, delete was missing
a check.

This cannot be tested properly with the current completion tests,
but it will be when I make them more strict in a follow up patch.

Added: 
    

Modified: 
    lldb/source/Commands/CommandObjectTarget.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 3e024ff91b382d7..33330ef0926d61f 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -4942,6 +4942,8 @@ class CommandObjectTargetStopHookDelete : public CommandObjectParsed {
   void
   HandleArgumentCompletion(CompletionRequest &request,
                            OptionElementVector &opt_element_vector) override {
+    if (request.GetCursorIndex())
+      return;
     lldb_private::CommandCompletions::InvokeCommonCompletionCallbacks(
         GetCommandInterpreter(), lldb::eStopHookIDCompletion, request, nullptr);
   }


        


More information about the lldb-commits mailing list