mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 36c7ce43d2 | |||
| f8fe2c4353 | |||
| ee8bc6caad | |||
| 226311ae3f | |||
| 193dd55534 | |||
| c7c0902a53 |
+3
-2
@@ -12,6 +12,7 @@ env:
|
||||
- MACOSX_DEPLOYMENT_TARGET=10.8
|
||||
VERSIONER_PERL_VERSION=5.16
|
||||
VERSIONER_PYTHON_VERSION=2.7
|
||||
vi_cv_path_python=/usr/bin/python
|
||||
vi_cv_path_python3=/usr/local/bin/python3
|
||||
vi_cv_path_plain_lua=/usr/local/bin/lua
|
||||
vi_cv_dll_name_perl=/System/Library/Perl/5.16/darwin-thread-multi-2level/CORE/libperl.dylib
|
||||
@@ -37,8 +38,8 @@ script:
|
||||
- make -j$NPROC
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "lua print(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "perl VIM::Msg(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "py print(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "py3 print(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "py import sys; print(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "py3 import sys; print(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "ruby puts(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- make test
|
||||
- make -C src/testdir clean
|
||||
|
||||
@@ -1255,7 +1255,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>109</string>
|
||||
<string>110</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
||||
@@ -164,12 +164,8 @@ enum {
|
||||
|
||||
oldTabBarStyle = [[view tabBarControl] styleName];
|
||||
|
||||
NSString *style;
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
|
||||
style = @"Yosemite";
|
||||
#else
|
||||
style = @"Unified";
|
||||
#endif
|
||||
NSString *style =
|
||||
shouldUseYosemiteTabBarStyle() ? @"Yosemite" : @"Unified";
|
||||
[[view tabBarControl] setStyleNamed:style];
|
||||
|
||||
// add text view
|
||||
|
||||
@@ -159,8 +159,7 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
|
||||
// Note that this implies that 'mmta' (if enabled) breaks input methods
|
||||
// when the Alt key is held.
|
||||
if ((flags & NSAlternateKeyMask) && [mmta boolValue] && [unmod length] == 1
|
||||
&& [unmod characterAtIndex:0] > 0x20
|
||||
&& [unmod characterAtIndex:0] < 0x7f) {
|
||||
&& [unmod characterAtIndex:0] > 0x20) {
|
||||
ASLogDebug(@"MACMETA key, don't interpret it");
|
||||
string = unmod;
|
||||
} else if (imState && (flags & NSControlKeyMask)
|
||||
|
||||
+11
-11
@@ -125,18 +125,18 @@ enum {
|
||||
[tabBarControl setDelegate:self];
|
||||
[tabBarControl setHidden:YES];
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
|
||||
CGFloat screenWidth = [[NSScreen mainScreen] frame].size.width;
|
||||
[tabBarControl setStyleNamed:@"Yosemite"];
|
||||
[tabBarControl setCellMinWidth:120];
|
||||
[tabBarControl setCellMaxWidth:screenWidth];
|
||||
[tabBarControl setCellOptimumWidth:screenWidth];
|
||||
#else
|
||||
[tabBarControl setCellMinWidth:[ud integerForKey:MMTabMinWidthKey]];
|
||||
[tabBarControl setCellMaxWidth:[ud integerForKey:MMTabMaxWidthKey]];
|
||||
[tabBarControl setCellOptimumWidth:
|
||||
if (shouldUseYosemiteTabBarStyle()) {
|
||||
CGFloat screenWidth = [[NSScreen mainScreen] frame].size.width;
|
||||
[tabBarControl setStyleNamed:@"Yosemite"];
|
||||
[tabBarControl setCellMinWidth:120];
|
||||
[tabBarControl setCellMaxWidth:screenWidth];
|
||||
[tabBarControl setCellOptimumWidth:screenWidth];
|
||||
} else {
|
||||
[tabBarControl setCellMinWidth:[ud integerForKey:MMTabMinWidthKey]];
|
||||
[tabBarControl setCellMaxWidth:[ud integerForKey:MMTabMaxWidthKey]];
|
||||
[tabBarControl setCellOptimumWidth:
|
||||
[ud integerForKey:MMTabOptimumWidthKey]];
|
||||
#endif
|
||||
}
|
||||
|
||||
[tabBarControl setShowAddTabButton:[ud boolForKey:MMShowAddTabButtonKey]];
|
||||
[[tabBarControl addTabButton] setTarget:self];
|
||||
|
||||
@@ -80,15 +80,6 @@
|
||||
#define FUOPT_BGCOLOR_HLGROUP 0x004
|
||||
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
|
||||
# define TABBAR_STYLE_UNIFIED @"Yosemite"
|
||||
# define TABBAR_STYLE_METAL @"Yosemite"
|
||||
#else
|
||||
# define TABBAR_STYLE_UNIFIED @"Unified"
|
||||
# define TABBAR_STYLE_METAL @"Metal"
|
||||
#endif
|
||||
|
||||
|
||||
@interface MMWindowController (Private)
|
||||
- (NSSize)contentSize;
|
||||
- (void)resizeWindowToFitContentSize:(NSSize)contentSize
|
||||
@@ -106,6 +97,8 @@
|
||||
- (void)applicationDidChangeScreenParameters:(NSNotification *)notification;
|
||||
- (void)enterNativeFullScreen;
|
||||
- (void)processAfterWindowPresentedQueue;
|
||||
+ (NSString *)tabBarStyleForUnified;
|
||||
+ (NSString *)tabBarStyleForMetal;
|
||||
@end
|
||||
|
||||
|
||||
@@ -1187,7 +1180,8 @@
|
||||
[[window animator] setAlphaValue:0];
|
||||
} completionHandler:^{
|
||||
[window setStyleMask:([window styleMask] | NSFullScreenWindowMask)];
|
||||
[[vimView tabBarControl] setStyleNamed:TABBAR_STYLE_UNIFIED];
|
||||
NSString *tabBarStyle = [[self class] tabBarStyleForUnified];
|
||||
[[vimView tabBarControl] setStyleNamed:tabBarStyle];
|
||||
[self updateTablineSeparator];
|
||||
|
||||
// Stay dark for some time to wait for things to sync, then do the full screen operation
|
||||
@@ -1251,7 +1245,8 @@
|
||||
fullScreenEnabled = NO;
|
||||
[window setAlphaValue:1];
|
||||
[window setStyleMask:([window styleMask] & ~NSFullScreenWindowMask)];
|
||||
[[vimView tabBarControl] setStyleNamed:TABBAR_STYLE_METAL];
|
||||
NSString *tabBarStyle = [[self class] tabBarStyleForMetal];
|
||||
[[vimView tabBarControl] setStyleNamed:tabBarStyle];
|
||||
[self updateTablineSeparator];
|
||||
[window setFrame:preFullScreenFrame display:YES];
|
||||
}
|
||||
@@ -1281,7 +1276,8 @@
|
||||
[[window animator] setAlphaValue:0];
|
||||
} completionHandler:^{
|
||||
[window setStyleMask:([window styleMask] & ~NSFullScreenWindowMask)];
|
||||
[[vimView tabBarControl] setStyleNamed:TABBAR_STYLE_METAL];
|
||||
NSString *tabBarStyle = [[self class] tabBarStyleForMetal];
|
||||
[[vimView tabBarControl] setStyleNamed:tabBarStyle];
|
||||
[self updateTablineSeparator];
|
||||
[window setFrame:preFullScreenFrame display:YES];
|
||||
|
||||
@@ -1328,7 +1324,8 @@
|
||||
fullScreenEnabled = YES;
|
||||
[window setAlphaValue:1];
|
||||
[window setStyleMask:([window styleMask] | NSFullScreenWindowMask)];
|
||||
[[vimView tabBarControl] setStyleNamed:TABBAR_STYLE_UNIFIED];
|
||||
NSString *tabBarStyle = [[self class] tabBarStyleForUnified];
|
||||
[[vimView tabBarControl] setStyleNamed:tabBarStyle];
|
||||
[self updateTablineSeparator];
|
||||
[self maximizeWindow:fullScreenOptions];
|
||||
}
|
||||
@@ -1691,5 +1688,16 @@
|
||||
|
||||
[afterWindowPresentedQueue release]; afterWindowPresentedQueue = nil;
|
||||
}
|
||||
|
||||
+ (NSString *)tabBarStyleForUnified
|
||||
{
|
||||
return shouldUseYosemiteTabBarStyle() ? @"Yosemite" : @"Unified";
|
||||
}
|
||||
|
||||
+ (NSString *)tabBarStyleForMetal
|
||||
{
|
||||
return shouldUseYosemiteTabBarStyle() ? @"Yosemite" : @"Metal";
|
||||
}
|
||||
|
||||
@end // MMWindowController (Private)
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#endif
|
||||
|
||||
// Needed for pre-10.11 SDK
|
||||
#ifndef NSAppKitVersionNumber10_10
|
||||
# define NSAppKitVersionNumber10_10 1343
|
||||
#endif
|
||||
#ifndef NSAppKitVersionNumber10_10_Max
|
||||
# define NSAppKitVersionNumber10_10_Max 1349
|
||||
#endif
|
||||
|
||||
@@ -151,3 +151,6 @@ NSView *showHiddenFilesView();
|
||||
// http://www.unicode.org/reports/tr15/
|
||||
NSString *normalizeFilename(NSString *filename);
|
||||
NSArray *normalizeFilenames(NSArray *filenames);
|
||||
|
||||
|
||||
BOOL shouldUseYosemiteTabBarStyle();
|
||||
|
||||
@@ -296,3 +296,12 @@ normalizeFilenames(NSArray *filenames)
|
||||
|
||||
return outnames;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
BOOL
|
||||
shouldUseYosemiteTabBarStyle()
|
||||
{
|
||||
return floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_10;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user