Fix vi ScrollToBottom motion
This resolves an issue with the ScrollToBottom motion in vi mode where it would jump between the first unoccupied cell across wrapped lines and the first unoccupied cell in the current line.
This commit is contained in:
parent
058b036fe7
commit
7987002dcf
|
@ -260,6 +260,9 @@ impl<T: EventListener> Execute<T> for Action {
|
||||||
// Move vi mode cursor.
|
// Move vi mode cursor.
|
||||||
let term = ctx.terminal_mut();
|
let term = ctx.terminal_mut();
|
||||||
term.vi_mode_cursor.point.line = term.grid().num_lines() - 1;
|
term.vi_mode_cursor.point.line = term.grid().num_lines() - 1;
|
||||||
|
|
||||||
|
// Move to beginning twice, to always jump across linewraps.
|
||||||
|
term.vi_motion(ViMotion::FirstOccupied);
|
||||||
term.vi_motion(ViMotion::FirstOccupied);
|
term.vi_motion(ViMotion::FirstOccupied);
|
||||||
},
|
},
|
||||||
Action::ClearHistory => ctx.terminal_mut().clear_screen(ClearMode::Saved),
|
Action::ClearHistory => ctx.terminal_mut().clear_screen(ClearMode::Saved),
|
||||||
|
|
Loading…
Reference in New Issue