From e30f11d9ee08309d545224091bad706b9a8d4eca Mon Sep 17 00:00:00 2001 From: Kate Stone Date: Mon, 17 Nov 2014 19:06:59 +0000 Subject: Complete rewrite of interactive editing support for single- and multi-line input. Improvements include: * Use of libedit's wide character support, which is imperfect but a distinct improvement over ASCII-only * Fallback for ASCII editing path * Support for a "faint" prompt clearly distinguished from input * Breaking lines and insert new lines in the middle of a batch by simply pressing return * Joining lines with forward and backward character deletion * Detection of paste to suppress automatic formatting and statement completion tests * Correctly reformatting when lines grow or shrink to occupy different numbers of rows * Saving multi-line history, and correctly preserving the "tip" of history during editing * Displaying visible ^C and ^D indications when interrupting input or sending EOF * Fledgling VI support for multi-line editing * General correctness and reliability improvements llvm-svn: 222163 --- lldb/source/Commands/CommandObjectCommands.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lldb/source/Commands/CommandObjectCommands.cpp') diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp index c7341c2..22cfc65 100644 --- a/lldb/source/Commands/CommandObjectCommands.cpp +++ b/lldb/source/Commands/CommandObjectCommands.cpp @@ -1030,11 +1030,15 @@ protected: if (argc == 1) { Debugger &debugger = m_interpreter.GetDebugger(); + bool color_prompt = debugger.GetUseColor(); const bool multiple_lines = true; // Get multiple lines IOHandlerSP io_handler_sp (new IOHandlerEditline (debugger, + IOHandler::Type::Other, "lldb-regex", // Name of input reader for history "\033[K> ", // Prompt and clear line + NULL, // Continuation prompt multiple_lines, + color_prompt, 0, // Don't show line numbers *this)); -- cgit v1.1