diff --git a/lldb/tools/driver/IOChannel.cpp b/lldb/tools/driver/IOChannel.cpp index 25274581efedd438d7dd4c8468b528140e5892cb..0ed6fd3267948119fa15196f01038ca675ddd6ef 100644 --- a/lldb/tools/driver/IOChannel.cpp +++ b/lldb/tools/driver/IOChannel.cpp @@ -50,6 +50,17 @@ IOChannel::GetPrompt () return pos->second.c_str(); } +bool +IOChannel::EditLineHasCharacters () +{ + const LineInfo *line_info = el_line(m_edit_line); + if (line_info) + return line_info->cursor != line_info->buffer; + else + return false; +} + + void IOChannel::EraseCharsBeforeCursor () { diff --git a/lldb/tools/driver/IOChannel.h b/lldb/tools/driver/IOChannel.h index e3c44b58d236f923ab5d2e59e99261002520cf03..fbeaac4a8683b653f6f858ef650fb093666b8fcd 100644 --- a/lldb/tools/driver/IOChannel.h +++ b/lldb/tools/driver/IOChannel.h @@ -96,6 +96,9 @@ public: const char * GetPrompt (); + bool + EditLineHasCharacters (); + void EraseCharsBeforeCursor ();