mirror of
https://github.com/ilyakooo0/helix.git
synced 2024-12-01 03:15:33 +03:00
Only render preview if picker has a preview function (#8667)
This commit is contained in:
parent
7d7ed78681
commit
d0430f1c81
@ -795,7 +795,8 @@ impl<T: Item + 'static + Send + Sync> Component for Picker<T> {
|
||||
// | | | |
|
||||
// +---------+ +---------+
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user