cocopon / vaffle.vim

:file_folder: Lightweight, window-based file manager for Vim
MIT License
284 stars 20 forks source link

On Windows, Vim opens a directory as a file if a passed directory name is ended a slash #3

Closed bamchoh closed 7 years ago

bamchoh commented 7 years ago

When I execute :Vaffle ~\dotfiles\vimfiles\, Vim opens a file as name "~\dotfiles\vimfiles" image

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.

bamchoh commented 7 years ago

I'm sorry. The cause of this issue is set set autochdir in my vimrc. If removing, files under ~\dotfiles\vimfiles\ are listed correclty.

cocopon commented 7 years ago

Thank you for the analysis! I'll try to fix the behavior with autochdir option later.