Add an API to determine whether there are any characters on the current input line.
llvm-svn: 157789
This commit is contained in:
parent
5c502811f1
commit
6d10c17a31
|
|
@ -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 ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -96,6 +96,9 @@ public:
|
|||
const char *
|
||||
GetPrompt ();
|
||||
|
||||
bool
|
||||
EditLineHasCharacters ();
|
||||
|
||||
void
|
||||
EraseCharsBeforeCursor ();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue