Skip to content

Commit e9b9613

Browse files
authored
Merge pull request #920 from ychin/option-remove-launch-animation
Add option to remove the launch animation of MacVim windows
2 parents 3bbddb3 + 2c3d9ad commit e9b9613

5 files changed

Lines changed: 14 additions & 3 deletions

File tree

runtime/doc/gui_mac.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ Here is a list of relevant dictionary entries:
247247
KEY VALUE ~
248248
*MMCellWidthMultiplier* width of a normal glyph in em units [float]
249249
*MMDialogsTrackPwd* open/save dialogs track the Vim pwd [bool]
250+
*MMDisableLaunchAnimation* disable launch animation when opening a new
251+
MacVim window [bool]
250252
*MMFullScreenFadeTime* fade delay for non-native fullscreen [float]
251253
*MMLoginShellArgument* login shell parameter [string]
252254
*MMLoginShellCommand* which shell to use to launch Vim [string]

runtime/doc/tags

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4827,7 +4827,7 @@ E993 popup.txt /*E993*
48274827
E994 eval.txt /*E994*
48284828
E995 eval.txt /*E995*
48294829
E996 eval.txt /*E996*
4830-
E996 popup.txt /*E996*
4830+
E997 popup.txt /*E997*
48314831
E999 repeat.txt /*E999*
48324832
EX intro.txt /*EX*
48334833
EXINIT starting.txt /*EXINIT*
@@ -4910,6 +4910,7 @@ M motion.txt /*M*
49104910
MDI starting.txt /*MDI*
49114911
MMCellWidthMultiplier gui_mac.txt /*MMCellWidthMultiplier*
49124912
MMDialogsTrackPwd gui_mac.txt /*MMDialogsTrackPwd*
4913+
MMDisableLaunchAnimation gui_mac.txt /*MMDisableLaunchAnimation*
49134914
MMFullScreenFadeTime gui_mac.txt /*MMFullScreenFadeTime*
49144915
MMLoginShellArgument gui_mac.txt /*MMLoginShellArgument*
49154916
MMLoginShellCommand gui_mac.txt /*MMLoginShellCommand*
@@ -8348,10 +8349,12 @@ popup-examples popup.txt /*popup-examples*
83488349
popup-filter popup.txt /*popup-filter*
83498350
popup-functions popup.txt /*popup-functions*
83508351
popup-intro popup.txt /*popup-intro*
8352+
popup-mask popup.txt /*popup-mask*
83518353
popup-menu gui.txt /*popup-menu*
83528354
popup-menu-added version5.txt /*popup-menu-added*
83538355
popup-position popup.txt /*popup-position*
83548356
popup-props popup.txt /*popup-props*
8357+
popup-scrollbar popup.txt /*popup-scrollbar*
83558358
popup-window popup.txt /*popup-window*
83568359
popup.txt popup.txt /*popup.txt*
83578360
popup_atcursor() popup.txt /*popup_atcursor()*

src/MacVim/MMWindowController.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,12 @@ - (id)initWithVimController:(MMVimController *)controller
224224
[win setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
225225

226226
// This makes windows animate when opened
227-
if ([win respondsToSelector:@selector(setAnimationBehavior:)])
228-
[win setAnimationBehavior:NSWindowAnimationBehaviorDocumentWindow];
227+
if ([win respondsToSelector:@selector(setAnimationBehavior:)]) {
228+
if (![[NSUserDefaults standardUserDefaults]
229+
boolForKey:MMDisableLaunchAnimation]) {
230+
[win setAnimationBehavior:NSWindowAnimationBehaviorDocumentWindow];
231+
}
232+
}
229233
#endif
230234

231235
[[NSNotificationCenter defaultCenter]

src/MacVim/Miscellaneous.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ extern NSString *MMOpenInCurrentWindowKey;
3535
extern NSString *MMNoFontSubstitutionKey;
3636
extern NSString *MMNoTitleBarWindowKey;
3737
extern NSString *MMTitlebarAppearsTransparentKey;
38+
extern NSString *MMDisableLaunchAnimation;
3839
extern NSString *MMLoginShellKey;
3940
extern NSString *MMUntitledWindowKey;
4041
extern NSString *MMZoomBothKey;

src/MacVim/Miscellaneous.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
NSString *MMNoFontSubstitutionKey = @"MMNoFontSubstitution";
3232
NSString *MMNoTitleBarWindowKey = @"MMNoTitleBarWindow";
3333
NSString *MMTitlebarAppearsTransparentKey = @"MMTitlebarAppearsTransparent";
34+
NSString *MMDisableLaunchAnimation = @"MMDisableLaunchAnimation";
3435
NSString *MMLoginShellKey = @"MMLoginShell";
3536
NSString *MMUntitledWindowKey = @"MMUntitledWindow";
3637
NSString *MMZoomBothKey = @"MMZoomBoth";

0 commit comments

Comments
 (0)