diff options
author | Christian Duerr <contact@christianduerr.com> | 2021-07-12 01:22:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-12 01:22:49 +0000 |
commit | 4c9ecd3479b6cce0493532561ef78ba410c3b51a (patch) | |
tree | 8e21ecc6c3bcf665f7e9b4f20f603b79985c6393 /alacritty_terminal/src/term/mod.rs | |
parent | bdfa52fcd84995dfa955e2d726a9c22f1f9d4bc9 (diff) | |
download | alacritty-4c9ecd3479b6cce0493532561ef78ba410c3b51a.tar.gz alacritty-4c9ecd3479b6cce0493532561ef78ba410c3b51a.zip |
Fix search regressions
Fixes #5315.
Diffstat (limited to 'alacritty_terminal/src/term/mod.rs')
-rw-r--r-- | alacritty_terminal/src/term/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs index ccec0166..29556517 100644 --- a/alacritty_terminal/src/term/mod.rs +++ b/alacritty_terminal/src/term/mod.rs @@ -512,9 +512,9 @@ impl<T> Term<T> { // Clamp vi cursor to viewport. let vi_point = self.vi_mode_cursor.point; - let viewport_bottom = Line(-(self.grid.display_offset() as i32)); - let viewport_top = viewport_bottom + self.bottommost_line(); - self.vi_mode_cursor.point.line = max(min(vi_point.line, viewport_top), viewport_bottom); + let viewport_top = Line(-(self.grid.display_offset() as i32)); + let viewport_bottom = viewport_top + self.bottommost_line(); + self.vi_mode_cursor.point.line = max(min(vi_point.line, viewport_bottom), viewport_top); self.vi_mode_cursor.point.column = min(vi_point.column, self.last_column()); // Reset scrolling region. |