mcchrish / nnn.vim

File manager for vim/neovim powered by n³
BSD 2-Clause "Simplified" License
645 stars 24 forks source link

Picker picks the wrong file if a directory with similar name exists #147

Closed N-R-K closed 2 years ago

N-R-K commented 2 years ago

To Reproduce

  1. Create the a dir/file test/a and a file named test.file
test
|   a
test.file
  1. Open test/a in vim
  2. Open NnnPicker
  3. Go back a directory and try to pick test.file

Expected behavior

It should pick ../test.file but instead it tries to open ../file

Environment:

mcchrish commented 2 years ago

I can replicate the issue.

Seems to be related to trimming the CWD from the file path.