Skip to content

Commit e8267a8

Browse files
committed
About MacVim show "pre-release" when running a pre-release build
This helps the user know whether they are using a relatively untested build and should consider going back to a main release. We currently just define "pre-release" build as any release version with a minor version, e.g. r176.1 is a pre-release, but r176 isn't. Also, move the order around so we show "MacVim r123 (Vim 9.0.1234)" instead of "Vim 9.0.1234 (MacVim r123)" which is more consistent with other ways we show version numbers, and this will be how we show version number when we upgrade to Sparkle 2.4 as well.
1 parent 43b4967 commit e8267a8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/MacVim/MMApplication.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,12 @@ - (void)orderFrontStandardAboutPanel:(id)sender
5252
@"CFBundleVersion"];
5353
NSString *marketingVersion = [[NSBundle mainBundle]
5454
objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
55+
56+
BOOL isPrerelease = [version containsSubstring:@"."];
57+
NSString *prerelease = isPrerelease ? @"\npre-release" : @"";
58+
5559
NSString *title = [NSString stringWithFormat:
56-
@"Vim %@ (MacVim r%@)", marketingVersion, version];
60+
@"MacVim r%@ (Vim %@)%@", version, marketingVersion, prerelease];
5761

5862
[self orderFrontStandardAboutPanelWithOptions:
5963
[NSDictionary dictionaryWithObjectsAndKeys:

0 commit comments

Comments
 (0)