From 961d8331f32f7fe0fa36533c9cead9692e01c873 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 22 Dec 2023 18:28:28 +0100 Subject: [PATCH] Prevent panels from getting so small they can't be resized --- crates/workspace2/src/dock.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/workspace2/src/dock.rs b/crates/workspace2/src/dock.rs index 7121f846810f69ffa2df88f1333cc9f7a903e72c..9c7ffc6e89d655bae71aeda049ff8034ac506492 100644 --- a/crates/workspace2/src/dock.rs +++ b/crates/workspace2/src/dock.rs @@ -467,6 +467,7 @@ impl Dock { pub fn resize_active_panel(&mut self, size: Option, cx: &mut ViewContext) { if let Some(entry) = self.panel_entries.get_mut(self.active_panel_index) { + let size = size.map(|size| size.max(RESIZE_HANDLE_SIZE)); entry.panel.set_size(size, cx); cx.notify(); }