From 29c053e84e2624feb786f520ebae4c752bc23279 Mon Sep 17 00:00:00 2001 From: Kirawi Date: Wed, 8 Dec 2021 02:11:18 -0500 Subject: Only use a single documentation popup (#1241) --- helix-term/src/ui/completion.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-term/src/ui/completion.rs') diff --git a/helix-term/src/ui/completion.rs b/helix-term/src/ui/completion.rs index dd782d29..fcd63199 100644 --- a/helix-term/src/ui/completion.rs +++ b/helix-term/src/ui/completion.rs @@ -168,7 +168,7 @@ impl Completion { } }; }); - let popup = Popup::new(menu); + let popup = Popup::new("completion", menu); let mut completion = Self { popup, start_offset, -- cgit v1.2.3-70-g09d2 From e1889261381cfc7a5980d84b3d6bd061c56e3ba2 Mon Sep 17 00:00:00 2001 From: Midnight Exigent Date: Tue, 14 Dec 2021 02:14:23 +0100 Subject: 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 --- helix-term/src/ui/completion.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'helix-term/src/ui/completion.rs') 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 { -- cgit v1.2.3-70-g09d2