-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
WIP (Don't merge): Fix external editor URL scheme improperly encoding file URLs #419
base: master
Are you sure you want to change the base?
Conversation
Fixes how iTerm2 handles encoding for the file protocol URL it uses to spawn external editors such as TextMate or MacVim. In particular, previously the slashes in the file:// URL were all encoded to "%2F", which would be incorrect as it resulted in paths such as file://%2FUsers%2Ffoo%2Ffile%20with%20space. The URL is invalid in that case and it's an accident that it worked with existing editors. Fix this by using the proper character set to encode (path) instead of the original "host" configuration. Also see macvim-dev/macvim#1020.
Hi, just to elaborate on the PR more. I'm the maintainer of MacVim and a short while ago we fixed our Basically to recap, the API is supposed to be |
Changed title to WIP because there are some discussions on macvim-dev/macvim#1020 where we are trying to decide on the encoding scheme. |
I haven't read the whole thread on macvim, but on its face this seems reasonable. The only reason that host escaping was chosen instead of path was to get backward compatibility with the execrable |
…looks like only BBEdit, TextMate, and MacVim take that code path so it won't be too bad to test. |
@gnachman are there any hopes that this will be merged? I'm currently using 161 due to this problem with iTerm. |
Sorry after some discussion I actually have to revert the change on MacVim and update this PR to use the new way. See the linked issue (at #419 (comment)) for discussion. I have been busy with work and other things but need to get to it. But yeah that's the reason why I didn't change the title from "WIP (Don't merge)". |
@ychin This PR seems obviously correct to me. Is there any reason merging it could cause harm for users of either old or new or forseeable future versions of macVim? |
Fixes how iTerm2 handles encoding for the file protocol URL it uses to spawn external editors such as TextMate or MacVim. In particular, previously the slashes in the file:// URL were all encoded to "%2F", which would be incorrect as it resulted in paths such as file://%2FUsers%2Ffoo%2Ffile%20with%20space. The URL is invalid in that case and it's an accident that it worked with existing editors.
Fix this by using the proper character set to encode (path) instead of the original "host" configuration.
Also see macvim-dev/macvim#1020.