From 6f135d713a742a76b548f2efa179356f702e0743 Mon Sep 17 00:00:00 2001 From: a5ob7r <12132068+a5ob7r@users.noreply.github.com> Date: Wed, 16 Jun 2021 17:55:15 +0900 Subject: [PATCH] Fix ScrollHalfPageUp vi cursor motion regression This regression was introduced in 3bd5ac2. Co-authored-by: Christian Duerr --- CHANGELOG.md | 1 + alacritty_terminal/src/vi_mode.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a3778f0..2be62dd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Regression in rendering performance with dense grids since 0.6.0 - Crash/Freezes with partially visible fullwidth characters due to alt screen resize +- Incorrect vi cursor position after invoking `ScrollPageHalfUp` action ## 0.8.0 diff --git a/alacritty_terminal/src/vi_mode.rs b/alacritty_terminal/src/vi_mode.rs index 54229998..6f370642 100644 --- a/alacritty_terminal/src/vi_mode.rs +++ b/alacritty_terminal/src/vi_mode.rs @@ -170,7 +170,7 @@ impl ViModeCursor { }; // Clamp movement to within visible region. - let line = (self.point.line - overscroll).grid_clamp(term, Boundary::Cursor); + let line = (self.point.line - overscroll).grid_clamp(term, Boundary::Grid); // Find the first occupied cell after scrolling has been performed. let target_line = (self.point.line - lines).grid_clamp(term, Boundary::Grid);