tpope/vim-vinegar

Changed/odd behavior with "-"

theunraveler opened this issue · 6 comments

Hello. It seems that the most recent commit (0620d01) introduced a few issues:

  1. When I press - while editing a file, netrw opens to what appears to be vim's pwd, not the directory that the file is in.
  2. After doing the above, then navigating to the same file, opening it again, then pressing - again, netrw opens to the same directory as above, but all of the file/directory names in the listing are duplicated. Do it again and all of the listings appear 3x, and so on.

I used git bisect to narrow it down to the commit above, and everything seems to work fine before that. Thanks!

tpope commented

Is b:netrw_curdir set while editing the file?

If you mean am I explicitly setting it in my config, then no. If you're wondering what the value of that variable is while editing a file, I'm not sure how to find that out (vimscript illiterate).

tpope commented

:echo b:netrw_curdir

Yes, it seems to be set to vim's pwd. For example, if I do vim ~/my_project, then navigate to ~/my_project/some_directory/another_directory/some_file.txt by just clicking through in netrw, the value of :echo b:netrw_curdir is just ~/my_project. Hope that helps...

Thanks for the quick responses; 9477d43 seems to have fixed the first issue. I'm still getting the second issue though. Any thoughts there?

Wonderful; both issues seem to be fixed now. Thanks for the quick attention, and sorry if you had to revert back to a hack.