mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:38:11 +00:00
LibLine: Expose actual_rendered_string_length & accept newlines in prompt
This commit is contained in:
parent
1d0d0e9d00
commit
ccdef5a675
2 changed files with 6 additions and 2 deletions
|
@ -1031,6 +1031,11 @@ size_t Editor::actual_rendered_string_length(const StringView& string) const
|
|||
state = Escape;
|
||||
continue;
|
||||
}
|
||||
if (c == '\r' || c == '\n') {
|
||||
// reset length to 0, since we either overwrite, or are on a newline
|
||||
length = 0;
|
||||
continue;
|
||||
}
|
||||
// FIXME: This will not support anything sophisticated
|
||||
++length;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue