@@ -14,7 +14,12 @@ impl Component for Info {
1414 let Info { width, height, .. } = self;
1515 let (w, h) = (*width + 2, *height + 2);
1616 // -2 to subtract command line + statusline. a bit of a hack, because of splits.
17− let area = Rect::new(viewport.width - w, viewport.height - h - 2, w, h);
17+ let area = viewport.intersection(Rect::new(
18+ viewport.width.saturating_sub(w),
19+ viewport.height.saturating_sub(h + 2),
20+ w,
21+ h,
22+ ));
1823 surface.clear_with(area, style);
1924 let Rect { x, y, .. } = block.inner(area);
2025 for (y, line) in (y..).zip(self.text.lines()) {