@@ -279,7 +279,7 @@ impl Prompt {
279279
280280 let height = ((self.completion.len() as u16 + cols - 1) / cols)
281281 .min(10) // at most 10 rows (or less)
282− .min(area.height);
282+ .min(area.height.saturating_sub(1));
283283
284284 let completion_area = Rect::new(
285285 area.x,
@@ -331,7 +331,7 @@ impl Prompt {
331331 let viewport = area;
332332 let area = viewport.intersection(Rect::new(
333333 completion_area.x,
334− completion_area.y - 3,
334+ completion_area.y.saturating_sub(3),
335335 BASE_WIDTH * 3,
336336 3,
337337 ));