Skip to content

Commit 3b39147

Browse files
authored
Merge pull request #1021 from frarees/uri_encode
Fix #1020
2 parents 984a905 + ab26430 commit 3b39147

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/MacVim/MMAppController.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,7 +1752,7 @@ - (void)handleGetURLEvent:(NSAppleEventDescriptor *)event
17521752
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
17531753
f = [f stringByRemovingPercentEncoding];
17541754
#else
1755-
f = [f stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
1755+
f = [f stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
17561756
#endif
17571757

17581758
// parse value
@@ -1763,20 +1763,20 @@ - (void)handleGetURLEvent:(NSAppleEventDescriptor *)event
17631763
if (decode)
17641764
{
17651765
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11
1766-
v = [f stringByRemovingPercentEncoding];
1766+
v = [v stringByRemovingPercentEncoding];
17671767
#else
1768-
v = [f stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
1768+
v = [v stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
17691769
#endif
17701770
}
17711771

1772-
[dict setValue:v forKey:f];
1772+
[dict setValue:v forKey:f];
17731773
}
17741774
}
17751775

17761776
// Actually open the file.
17771777
NSString *file = [dict objectForKey:@"url"];
17781778
if (file != nil) {
1779-
NSURL *fileUrl= [NSURL URLWithString:file];
1779+
NSURL *fileUrl = [NSURL URLWithString:file];
17801780
// TextMate only opens files that already exist.
17811781
if ([fileUrl isFileURL]
17821782
&& [[NSFileManager defaultManager] fileExistsAtPath:

0 commit comments

Comments
 (0)