diff options
Diffstat (limited to 'helix-term/src/ui/prompt.rs')
-rw-r--r-- | helix-term/src/ui/prompt.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index 8bb6ba93..1f424878 100644 --- a/helix-term/src/ui/prompt.rs +++ b/helix-term/src/ui/prompt.rs @@ -160,7 +160,13 @@ impl Prompt { if let Some(doc) = (self.doc_fn)(&self.line) { let text = ui::Text::new(doc.to_string()); - let area = Rect::new(completion_area.x, completion_area.y - 3, BASE_WIDTH * 3, 3); + let viewport = area; + let area = viewport.intersection(Rect::new( + completion_area.x, + completion_area.y - 3, + BASE_WIDTH * 3, + 3, + )); let background = theme.get("ui.help"); surface.clear_with(area, background); |