Fix off-by-one in ParagraphUp binding

This commit is contained in:
Kevan authored and GitHub committed 2026-08-17 19:36:06 +00:00
1 parent 1b2b36a64e
commit 7dd7b5b09e
3 files changed
+3 -1

No files matched your search

+1
View File
@@ -19,6 +19,7 @@ Notable changes to the `alacritty_terminal` crate are documented in its
- Spurious "Failed to set new owner of XCB selection" warnings on X11
- Lacking permissions to launch software sending Apple events
- Off-by-one in vi mode ParagraphUp action
## 0.17.0
+1
View File
@@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed
- Panic when the PTY could not be set to non-blocking
- Off-by-one in ViMotion::ParagraphUp
## 0.26.0
+1 -1
View File
@@ -161,7 +161,7 @@ impl ViModeCursor {
// Skip empty lines until we find the next paragraph,
// then skip over the paragraph until we reach the next empty line.
let topmost_line = term.topmost_line();
self.point.line = (*topmost_line..*self.point.line)
self.point.line = (*topmost_line..=*self.point.line)
.rev()
.skip_while(|line| term.grid()[Line(*line)].is_clear())
.find(|line| term.grid()[Line(*line)].is_clear())