Skip to content

Fix #1020 #1021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/MacVim/MMAppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1752,7 +1752,7 @@ - (void)handleGetURLEvent:(NSAppleEventDescriptor *)event
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
f = [f stringByRemovingPercentEncoding];
#else
f = [f stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
f = [f stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
#endif

// parse value
Expand All @@ -1763,20 +1763,20 @@ - (void)handleGetURLEvent:(NSAppleEventDescriptor *)event
if (decode)
{
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
v = [f stringByRemovingPercentEncoding];
v = [v stringByRemovingPercentEncoding];
#else
v = [f stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
v = [v stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
#endif
}

[dict setValue:v forKey:f];
[dict setValue:v forKey:f];
}
}

// Actually open the file.
NSString *file = [dict objectForKey:@"url"];
if (file != nil) {
NSURL *fileUrl= [NSURL URLWithString:file];
NSURL *fileUrl = [NSURL URLWithString:file];
// TextMate only opens files that already exist.
if ([fileUrl isFileURL]
&& [[NSFileManager defaultManager] fileExistsAtPath:
Expand Down