From 30afcb74cd20edc73dcc55e275d764dc28779a11 Mon Sep 17 00:00:00 2001 From: Yee Cheng Chin Date: Wed, 11 Oct 2023 19:16:00 -0700 Subject: [PATCH] Fix tabs drawing over rest of MacVim in macOS 14 Sonoma macOS 14 now defaults clipsToBounds to false, which works in most places in MacVim but seems to cause issues with PSMTabBar which relies on clipping to work. Since we are replacing it soon, simply set clipsToBounds to true for the control. Fix #1439 --- src/MacVim/PSMTabBarControl/source/PSMTabBarControl.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/MacVim/PSMTabBarControl/source/PSMTabBarControl.m b/src/MacVim/PSMTabBarControl/source/PSMTabBarControl.m index 08f2487511..6c8bab1223 100644 --- a/src/MacVim/PSMTabBarControl/source/PSMTabBarControl.m +++ b/src/MacVim/PSMTabBarControl/source/PSMTabBarControl.m @@ -147,6 +147,10 @@ - (void)initAddedProperties } [_addTabButton setNeedsDisplay:YES]; } + +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 140000 + [self setClipsToBounds:YES]; +#endif } - (id)initWithFrame:(NSRect)frame