diff options
Diffstat (limited to 'helix-term/src/ui/prompt.rs')
-rw-r--r-- | helix-term/src/ui/prompt.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index dbbef72c..e6c383b6 100644 --- a/helix-term/src/ui/prompt.rs +++ b/helix-term/src/ui/prompt.rs @@ -271,8 +271,9 @@ impl Component for Prompt { } fn cursor_position(&self, area: Rect, editor: &Editor) -> Option<Position> { + let line = area.height as usize - 1; Some(Position::new( - area.y as usize, + area.y as usize + line, area.x as usize + self.prompt.len() + self.cursor, )) } |