summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2020-05-16 00:16:21 +0000
committerGitHub <noreply@github.com>2020-05-16 03:16:21 +0300
commit7987002dcf1bdcf87a67f22758b3bb3eafe13f93 (patch)
tree08f9b1ef770e768c095c5865303f49fca0c66b7c
parent058b036fe7f3a7cdc2ebdc21ab25aded783e4e59 (diff)
downloadalacritty-7987002dcf1bdcf87a67f22758b3bb3eafe13f93.tar.gz
alacritty-7987002dcf1bdcf87a67f22758b3bb3eafe13f93.zip
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.
-rw-r--r--alacritty/src/input.rs3
1 files changed, 3 insertions, 0 deletions
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<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),