diff options
| author | Jim Ingham <jingham@apple.com> | 2022-06-03 11:32:43 -0700 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2022-06-03 11:34:53 -0700 |
| commit | 8cc8b36f24d6f3133c44e238a657309620eedc19 (patch) | |
| tree | 71c0b653d0acf3e891e2fd4dfb83850b6333836f /lldb/source/Commands/CommandObjectRegexCommand.cpp | |
| parent | ef8e91826126a23e59a0241e1e3a1eba82db0202 (diff) | |
CommandObjectRegexCommand shouldn't put two commands on the history stack.
It was putting the command the user typed, and then the resolved command in the
command history. That caused up-arrow not to work correctly when the regex command
was invoked from a Python-command. Plus it's just weird.
Differential Revision: https://reviews.llvm.org/D126789
Diffstat (limited to 'lldb/source/Commands/CommandObjectRegexCommand.cpp')
| -rw-r--r-- | lldb/source/Commands/CommandObjectRegexCommand.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandObjectRegexCommand.cpp b/lldb/source/Commands/CommandObjectRegexCommand.cpp index a99a9e760cb2..857193036e39 100644 --- a/lldb/source/Commands/CommandObjectRegexCommand.cpp +++ b/lldb/source/Commands/CommandObjectRegexCommand.cpp @@ -71,11 +71,10 @@ bool CommandObjectRegexCommand::DoExecute(llvm::StringRef command, // Interpret the new command and return this as the result! if (m_interpreter.GetExpandRegexAliases()) result.GetOutputStream().Printf("%s\n", new_command->c_str()); - // Pass in true for "no context switching". The command that called us - // should have set up the context appropriately, we shouldn't have to - // redo that. + // We don't have to pass an override_context here, as the command that + // called us should have set up the context appropriately. return m_interpreter.HandleCommand(new_command->c_str(), - eLazyBoolCalculate, result); + eLazyBoolNo, result); } } result.SetStatus(eReturnStatusFailed); |
