[Lldb-commits] [lldb] r157789 - in /lldb/trunk/tools/driver: IOChannel.cpp IOChannel.h

Jim Ingham jingham at apple.com
Thu May 31 18:03:40 PDT 2012


Author: jingham
Date: Thu May 31 20:03:40 2012
New Revision: 157789

URL: http://llvm.org/viewvc/llvm-project?rev=157789&view=rev
Log:
Add an API to determine whether there are any characters on the current input line.

Modified:
    lldb/trunk/tools/driver/IOChannel.cpp
    lldb/trunk/tools/driver/IOChannel.h

Modified: lldb/trunk/tools/driver/IOChannel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/IOChannel.cpp?rev=157789&r1=157788&r2=157789&view=diff
==============================================================================
--- lldb/trunk/tools/driver/IOChannel.cpp (original)
+++ lldb/trunk/tools/driver/IOChannel.cpp Thu May 31 20:03:40 2012
@@ -50,6 +50,17 @@
     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 ()
 {

Modified: lldb/trunk/tools/driver/IOChannel.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/IOChannel.h?rev=157789&r1=157788&r2=157789&view=diff
==============================================================================
--- lldb/trunk/tools/driver/IOChannel.h (original)
+++ lldb/trunk/tools/driver/IOChannel.h Thu May 31 20:03:40 2012
@@ -96,6 +96,9 @@
     const char *
     GetPrompt ();
 
+    bool
+    EditLineHasCharacters ();
+    
     void
     EraseCharsBeforeCursor ();
 





More information about the lldb-commits mailing list