diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | alacritty/src/event.rs | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index e5be002d..59ad284e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed - Line indicator obstructing vi mode cursor when scrolled into history +- Vi mode search starting in the line below the vi cursor ## 0.9.0 diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs index cc817f6e..37dc2cd1 100644 --- a/alacritty/src/event.rs +++ b/alacritty/src/event.rs @@ -420,6 +420,11 @@ impl<'a, N: Notify + 'a, T: EventListener> input::ActionContext<T> for ActionCon if self.terminal.mode().contains(TermMode::VI) { self.search_state.origin = self.terminal.vi_mode_cursor.point; self.search_state.display_offset_delta = 0; + + // Adjust origin for content moving upward on search start. + if self.terminal.grid().cursor.point.line + 1 == self.terminal.screen_lines() { + self.search_state.origin.line -= 1; + } } else { let viewport_top = Line(-(self.terminal.grid().display_offset() as i32)) - 1; let viewport_bottom = viewport_top + self.terminal.bottommost_line(); |