on master help sign in
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>

commite1889261381cfc7a5980d84b3d6bd061c56e3ba2 authorMidnight Exigent <36641328+midnightexigent@users.noreply.github.com> dateTue 14 Dec 2021, 02:14 (5 years ago) parent10ad25b
1 file changed+2−2
helix-term/src/ui/completion.rs+2−2
helix-term/src/ui/completion.rs+2−2
@@ -328,8 +328,8 @@ impl Component for Completion {
328328 let y = popup_y;
329329
330330 if let Some((rel_width, rel_height)) = markdown_doc.required_size((width, height)) {
331− width = rel_width;
332− height = rel_height;
331+ width = rel_width.min(width);
332+ height = rel_height.min(height);
333333 }
334334 Rect::new(x, y, width, height)
335335 } else {