Fix panic when scrolling through completion popup (#1260)
* fix(completion_popup): Fixes #1256 * Update helix-term/src/ui/completion.rs Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
This commit is contained in:
parent
10ad25b95b
commit
e188926138
@ -328,8 +328,8 @@ fn render(&mut self, area: Rect, surface: &mut Surface, cx: &mut Context) {
|
|||||||
let y = popup_y;
|
let y = popup_y;
|
||||||
|
|
||||||
if let Some((rel_width, rel_height)) = markdown_doc.required_size((width, height)) {
|
if let Some((rel_width, rel_height)) = markdown_doc.required_size((width, height)) {
|
||||||
width = rel_width;
|
width = rel_width.min(width);
|
||||||
height = rel_height;
|
height = rel_height.min(height);
|
||||||
}
|
}
|
||||||
Rect::new(x, y, width, height)
|
Rect::new(x, y, width, height)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user