Bug (?) with getcwd()

19 views
Skip to first unread message

Alexas Chee

unread,
Jun 22, 2016, 1:32:35 PM6/22/16
to vim_use
On Windows, I have this in the registry:

[HKEY_CLASSES_ROOT\*\shell\Open in gVim Tab\command]
@="\"d:\\Vim\\vim74\\gvim.exe\" --remote-tab-silent \"%1\" \"%*\""

and I like to open files with right-click "Open in gVim Tab" in Explorer.

But today when I did this on a file (say, c:\abc's\file), I got this:

E15: Invalid expression: getcwd() ==# 'c:\abc's' | cd - |endif|endif

I encountered this before - when I tried to right-click open files in a drive's root directory (like, j:\file) and back then the message was:

E114: Missing quote: "j:\"|cd -|endif|endif
E15: Invalid expression: getcwd() ==# "j:\|cd -|endif|endif

See the difference? double quotes and single quotes.

If I change c:\abc's to c:\abc''s, vim gives no error.

So maybe getcwd() should check if there is char like ' in the path name.

Reply all
Reply to author
Forward
0 new messages