On Windows, Vim opens a directory as a file if a passed directory name is ended a slash
Closed this issue · 2 comments
When I execute :Vaffle ~\dotfiles\vimfiles\
, Vim opens a file as name "~\dotfiles\vimfiles"
I tried to challenge finding the cause of this issue. But I'm sorry that I could not find it out.
It seems that let bufname = bufname('%')
in vaffle#init
returns empty string when this directory name is passed. So Vaffle cannot recognize that the passed string is a directory. But I don't know why bufname('%')
returns empty string.
When I tried this issue on Ubuntu on Docker, But I cannot see this issue on the platform. So I think this issue is only on Windows.
I'm sorry. The cause of this issue is set set autochdir
in my vimrc. If removing, files under ~\dotfiles\vimfiles\
are listed correclty.
Thank you for the analysis! I'll try to fix the behavior with autochdir
option later.