From 7987002dcf1bdcf87a67f22758b3bb3eafe13f93 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Sat, 16 May 2020 00:16:21 +0000 Subject: [PATCH] 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. --- alacritty/src/input.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/alacritty/src/input.rs b/alacritty/src/input.rs index f5f4106c..6f1a71aa 100644 --- a/alacritty/src/input.rs +++ b/alacritty/src/input.rs @@ -260,6 +260,9 @@ impl Execute 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),