From 3d348a439efb86f0b60a58e98c37fae3d7078ea6 Mon Sep 17 00:00:00 2001 From: Eric Wing Date: Wed, 9 Feb 2011 11:25:09 -0800 Subject: [PATCH] Fix URL scheme handler to accept paths with spaces --- src/MacVim/MMAppController.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/MacVim/MMAppController.m b/src/MacVim/MMAppController.m index 035fbbe5c6..2b4c09abdb 100644 --- a/src/MacVim/MMAppController.m +++ b/src/MacVim/MMAppController.m @@ -1616,6 +1616,9 @@ fsEventCallback(ConstFSEventStreamRef streamRef, { NSString *urlString = [[event paramDescriptorForKeyword:keyDirectObject] stringValue]; + // NOTE: URLWithString requires string to be percent escaped. + urlString = [urlString stringByAddingPercentEscapesUsingEncoding: + NSUTF8StringEncoding]; NSURL *url = [NSURL URLWithString:urlString]; // We try to be compatible with TextMate's URL scheme here, as documented