Skip to content

Commit d0d93cd

Browse files
committed
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. Also, fix configure --with-macsdk to work, by updating to use modern Xcode folder structures and linker flags. Fix #1439
1 parent 5098093 commit d0d93cd

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

src/MacVim/PSMTabBarControl/source/PSMTabBarControl.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ - (void)initAddedProperties
147147
}
148148
[_addTabButton setNeedsDisplay:YES];
149149
}
150+
151+
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 140000
152+
[self setClipsToBounds:YES];
153+
#endif
150154
}
151155

152156
- (id)initWithFrame:(NSRect)frame

src/auto/configure

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4960,13 +4960,18 @@ fi
49604960
printf %s "checking if SDK is supported... " >&6; }
49614961
save_cflags="$CFLAGS"
49624962
save_ldflags="$LDFLAGS"
4963-
sdkflags="$DEVELOPER_DIR/SDKs/MacOSX$MACSDK"
4963+
4964+
sdkflags="$DEVELOPER_DIR/SDKs/MacOSX$MACSDK"
49644965
if test "x$MACSDK" = "x10.4"; then
49654966
sdkflags="$sdkflags""u"
49664967
fi
4968+
if ! test -d "$sdkflags.sdk"; then
4969+
sdkflags="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$MACSDK"
4970+
fi
49674971
sdkflags="$sdkflags.sdk -mmacosx-version-min=$MACSDK"
4972+
49684973
CFLAGS="$CFLAGS -isysroot $sdkflags"
4969-
LDFLAGS="$LDFLAGS -Wl,-syslibroot,$sdkflags"
4974+
LDFLAGS="$LDFLAGS -isysroot $sdkflags"
49704975
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49714976
/* end confdefs.h. */
49724977

src/configure.ac

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,20 @@ if test "$vim_cv_uname_output" = Darwin; then
280280
AC_MSG_CHECKING(if SDK is supported)
281281
save_cflags="$CFLAGS"
282282
save_ldflags="$LDFLAGS"
283+
284+
dnl Old location of SDKs and also in Command-Line Tools
283285
sdkflags="$DEVELOPER_DIR/SDKs/MacOSX$MACSDK"
284286
if test "x$MACSDK" = "x10.4"; then
285287
sdkflags="$sdkflags""u"
286288
fi
289+
if ! test -d "$sdkflags.sdk"; then
290+
dnl Location of SDKs in Xcode
291+
sdkflags="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$MACSDK"
292+
fi
287293
sdkflags="$sdkflags.sdk -mmacosx-version-min=$MACSDK"
294+
288295
CFLAGS="$CFLAGS -isysroot $sdkflags"
289-
LDFLAGS="$LDFLAGS -Wl,-syslibroot,$sdkflags"
296+
LDFLAGS="$LDFLAGS -isysroot $sdkflags"
290297
AC_LINK_IFELSE([AC_LANG_PROGRAM([ ], [ ])],
291298
[ AC_MSG_RESULT([yes])
292299
XCODEFLAGS="$XCODEFLAGS -sdk macosx$MACSDK MACOSX_DEPLOYMENT_TARGET=$MACSDK" ],

0 commit comments

Comments
 (0)