ui: Restrain diagnostic sidebar w/h based on available area.

pull/8/head
Blaž Hrastnik 4 years ago
parent 87e3cd3df2
commit 872d770753

@ -362,12 +362,14 @@ impl EditorView {
}
let paragraph = Paragraph::new(lines).alignment(Alignment::Right);
let width = 80.min(viewport.width);
let height = 15.min(viewport.height);
paragraph.render(
Rect::new(
viewport.x + viewport.width - 80 - 1,
viewport.right() - width,
viewport.y as u16 + 1,
80,
15,
width,
height,
),
surface,
);

Loading…
Cancel
Save