On Windows, if the filename has spaces, Startify fails to change the directory.
Somewhere along the line, a:path, the path to the file that was selected, gets its spaces escaped with backslashes and this seems to be the cause of the issue.
On line 973 of autoload/startify, it calls fnamemodify(a:path, ':h') but only escapes up to the last space of the filename (e.g. C:\Users\rioog\folder\file\ with\ spaces becomes C:\Users\rioog\folder\file\ with). As this is not a valid directory name, it does not change the directory.
I haven't been able to track down where this improper escaping takes place so for now I've just changed that line to fnamemodify(expand('%'), ':h').
On Windows, if the filename has spaces, Startify fails to change the directory.
Somewhere along the line,
a:path
, the path to the file that was selected, gets its spaces escaped with backslashes and this seems to be the cause of the issue.On line 973 of autoload/startify, it calls
fnamemodify(a:path, ':h')
but only escapes up to the last space of the filename (e.g.C:\Users\rioog\folder\file\ with\ spaces
becomesC:\Users\rioog\folder\file\ with
). As this is not a valid directory name, it does not change the directory.I haven't been able to track down where this improper escaping takes place so for now I've just changed that line to
fnamemodify(expand('%'), ':h')
.