diff options
author | Ebuka Ezike <yerimyah1@gmail.com> | 2025-04-22 12:21:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-22 12:21:23 +0100 |
commit | d7d170656404e1cb29a51689fd66a12bc060c630 (patch) | |
tree | a9b8ed15e6df569541a3ef982e5ed29aa9748dce /lldb/source/Interpreter/CommandInterpreter.cpp | |
parent | a095ebc58c9f7cd0d39796ed0aabc63b23ed88ce (diff) | |
download | llvm-d7d170656404e1cb29a51689fd66a12bc060c630.zip llvm-d7d170656404e1cb29a51689fd66a12bc060c630.tar.gz llvm-d7d170656404e1cb29a51689fd66a12bc060c630.tar.bz2 |
[lldb] Fix use-color settings not persistent (#135626)
Fixes https://github.com/llvm/llvm-project/issues/22981
If `settings set use-color` is changed when lldb is running it does not take effect.
This is fixes that.
---------
Signed-off-by: Ebuka Ezike <yerimyah1@gmail.com>
Co-authored-by: Jonas Devlieghere <jonas@devlieghere.com>
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 112d2f2..eb4741f 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -2236,12 +2236,17 @@ CommandInterpreter::GetAutoSuggestionForCommand(llvm::StringRef line) { void CommandInterpreter::UpdatePrompt(llvm::StringRef new_prompt) { EventSP prompt_change_event_sp( new Event(eBroadcastBitResetPrompt, new EventDataBytes(new_prompt))); - ; + BroadcastEvent(prompt_change_event_sp); if (m_command_io_handler_sp) m_command_io_handler_sp->SetPrompt(new_prompt); } +void CommandInterpreter::UpdateUseColor(bool use_color) { + if (m_command_io_handler_sp) + m_command_io_handler_sp->SetUseColor(use_color); +} + bool CommandInterpreter::Confirm(llvm::StringRef message, bool default_answer) { // Check AutoConfirm first: if (m_debugger.GetAutoConfirm()) |