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:
Christian Duerr authored and GitHub committed 2020-05-16 03:16:21 +03:00
1 parent 058b036fe7
commit 7987002dcf
1 file changed
+3
+3
View File
@@ -260,6 +260,9 @@ impl<T: EventListener> Execute<T> for Action {
// Move vi mode cursor.
let term = ctx.terminal_mut();
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);
},
Action::ClearHistory => ctx.terminal_mut().clear_screen(ClearMode::Saved),