diff --git a/crates/gpui_macos/src/window.rs b/crates/gpui_macos/src/window.rs index 88a694c971..d8f5b3c878 100644 --- a/crates/gpui_macos/src/window.rs +++ b/crates/gpui_macos/src/window.rs @@ -1978,9 +1978,16 @@ impl PlatformWindow for MacWindow { } } "Fill" => { - // There is no documented API for "Fill" action, so we'll just zoom the window if is_resizable { - window.zoom_(nil); + // Unlike `zoom:`, AppKit's private Fill action honors the system's + // "Tiled windows have margins" setting. + let responds_to_zoom_fill: BOOL = + msg_send![window, respondsToSelector: sel!(_zoomFill:)]; + if responds_to_zoom_fill == YES { + let _: () = msg_send![window, _zoomFill: nil]; + } else { + window.zoom_(nil); + } } } _ => {