Skip to content
Snippets Groups Projects
Commit 6d10c17a authored by Jim Ingham's avatar Jim Ingham
Browse files

Add an API to determine whether there are any characters on the current input line.

llvm-svn: 157789
parent 5c502811
No related branches found
No related tags found
No related merge requests found
...@@ -50,6 +50,17 @@ IOChannel::GetPrompt () ...@@ -50,6 +50,17 @@ IOChannel::GetPrompt ()
return pos->second.c_str(); 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 void
IOChannel::EraseCharsBeforeCursor () IOChannel::EraseCharsBeforeCursor ()
{ {
......
...@@ -96,6 +96,9 @@ public: ...@@ -96,6 +96,9 @@ public:
const char * const char *
GetPrompt (); GetPrompt ();
bool
EditLineHasCharacters ();
void void
EraseCharsBeforeCursor (); EraseCharsBeforeCursor ();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment