[lldb] Use EL_REFRESH to refresh Editline
Letting Editline refresh itself is more robust and ensures that the current text is redraw if it was accidentally cleared. In that scenario MoveCursor would only fix up the cursor position.
This commit is contained in:
parent
35b80031f4
commit
3edae0d5e5
@ -1713,7 +1713,7 @@ void Editline::Refresh() {
|
||||
if (!m_editline || !m_output_stream_sp)
|
||||
return;
|
||||
LockedStreamFile locked_stream = m_output_stream_sp->Lock();
|
||||
MoveCursor(CursorLocation::EditingCursor, CursorLocation::EditingCursor);
|
||||
el_set(m_editline, EL_REFRESH);
|
||||
}
|
||||
|
||||
bool Editline::CompleteCharacter(char ch, EditLineGetCharType &out) {
|
||||
|
||||
@ -114,8 +114,6 @@ class TestStatusline(PExpectTest):
|
||||
self.resize()
|
||||
self.expect("set set show-statusline true", ["no target"])
|
||||
self.resize(20, 60)
|
||||
# Check for the newline followed by the escape code to move the cursor
|
||||
# up one line.
|
||||
self.child.expect(re.escape("\n\x1b[1A"))
|
||||
# Check for the escape code to move the cursor back to column 8.
|
||||
self.child.expect(re.escape("\x1b[8G"))
|
||||
# Check for the escape code to resize the scroll window, followed by
|
||||
# the prompt.
|
||||
self.child.expect(re.escape("\x1b[1;19r\x1b8(lldb)"))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user