diff options
author | Midnight Exigent | 2021-12-14 01:14:23 +0000 |
---|---|---|
committer | GitHub | 2021-12-14 01:14:23 +0000 |
commit | e1889261381cfc7a5980d84b3d6bd061c56e3ba2 (patch) | |
tree | eb449a8c9e554d421021a25b4430ffbf4d2c21b1 /helix-term/src/ui | |
parent | 10ad25b95b64b0f0e9d4ab9d43467d11f4be3c21 (diff) |
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>
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r-- | helix-term/src/ui/completion.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/ui/completion.rs b/helix-term/src/ui/completion.rs index fcd63199..a55201ff 100644 --- a/helix-term/src/ui/completion.rs +++ b/helix-term/src/ui/completion.rs @@ -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 { |