summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectExpression.cpp
diff options
context:
space:
mode:
authorKate Stone <katherine.stone@apple.com>2014-11-17 19:06:59 +0000
committerKate Stone <katherine.stone@apple.com>2014-11-17 19:06:59 +0000
commite30f11d9ee08309d545224091bad706b9a8d4eca (patch)
treec0f6ed7b1e016ce9ad3451d31a2cad609963f823 /lldb/source/Commands/CommandObjectExpression.cpp
parent278ddec22c8b95d9849fb74450b7f9f18c80421c (diff)
downloadbcm5719-llvm-e30f11d9ee08309d545224091bad706b9a8d4eca.tar.gz
bcm5719-llvm-e30f11d9ee08309d545224091bad706b9a8d4eca.zip
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
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 079c62ddfdf..d36e3dbbc5d 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -425,11 +425,15 @@ CommandObjectExpression::GetMultilineExpression ()
m_expr_line_count = 0;
Debugger &debugger = GetCommandInterpreter().GetDebugger();
+ bool color_prompt = debugger.GetUseColor();
const bool multiple_lines = true; // Get multiple lines
IOHandlerSP io_handler_sp (new IOHandlerEditline (debugger,
+ IOHandler::Type::Expression,
"lldb-expr", // Name of input reader for history
NULL, // No prompt
+ NULL, // Continuation prompt
multiple_lines,
+ color_prompt,
1, // Show line numbers starting at 1
*this));
OpenPOWER on IntegriCloud