diff options
Diffstat (limited to 'alacritty_terminal/src/term/search.rs')
-rw-r--r-- | alacritty_terminal/src/term/search.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/alacritty_terminal/src/term/search.rs b/alacritty_terminal/src/term/search.rs index a6664054..e9c55f1c 100644 --- a/alacritty_terminal/src/term/search.rs +++ b/alacritty_terminal/src/term/search.rs @@ -420,7 +420,9 @@ impl<T> Term<T> { /// Find the end of the current line across linewraps. pub fn line_search_right(&self, mut point: Point<usize>) -> Point<usize> { - while self.grid[point.line][self.cols() - 1].flags.contains(Flags::WRAPLINE) { + while point.line > 0 + && self.grid[point.line][self.cols() - 1].flags.contains(Flags::WRAPLINE) + { point.line -= 1; } |