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>
imgbot
Midnight Exigent 3 years ago committed by GitHub
parent 10ad25b95b
commit e188926138
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -328,8 +328,8 @@ impl Component for Completion {
let y = popup_y;
if let Some((rel_width, rel_height)) = markdown_doc.required_size((width, height)) {
width = rel_width;
height = rel_height;
width = rel_width.min(width);
height = rel_height.min(height);
}
Rect::new(x, y, width, height)
} else {

Loading…
Cancel
Save