From d0430f1c8166e5aad495474eb5c847a0df4dcb2f Mon Sep 17 00:00:00 2001 From: Ryan Mehri Date: Mon, 30 Oct 2023 13:03:38 -0700 Subject: Only render preview if picker has a preview function (#8667) --- helix-term/src/ui/picker.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'helix-term/src') diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs index 2c41fc12..0214a391 100644 --- a/helix-term/src/ui/picker.rs +++ b/helix-term/src/ui/picker.rs @@ -795,7 +795,8 @@ impl Component for Picker { // | | | | // +---------+ +---------+ - let render_preview = self.show_preview && area.width > MIN_AREA_WIDTH_FOR_PREVIEW; + let render_preview = + self.show_preview && self.file_fn.is_some() && area.width > MIN_AREA_WIDTH_FOR_PREVIEW; let picker_width = if render_preview { area.width / 2 -- cgit v1.2.3-70-g09d2