Closed insidewhy closed 7 years ago
So essentially:
:tabnew
:tab drop file
Leads to a bugged file
buffer (since the tabnew
means it happens from an empty buffer). But:
:edit file1
:tab drop file2
Everything is fine.
Using vim-node
's gf
feature on any source file causes this state to occur on every buffer.
I've found the condition that makes it bug out:
https://github.com/cloudhead/neovim-fuzzy/blob/master/plugin/neovim-fuzzy.vim#L148
On that line the first entry in the array is an empty string, whenever that condition occurs the bugged behaviour happens.
https://github.com/cloudhead/neovim-fuzzy/blob/master/plugin/neovim-fuzzy.vim#L144
This line here is where the empty string gets added to ignorelist
.
Okay it all makes sense now, bufname('#')
gets the name of the "alternate buffer", the last buffer used. When using tab drop
and gf
sometimes this can end up being an empty name. Need to make sure the string isn't empty before appending it to that array. Easy PR.
In this buffer when you run
:FuzzyOpen
it matches on filenames in open buffers, not all the files in git. If you switch to any other buffer it will behave normally, but switch back to the "bugged" buffer and it won't work.However if you
:tab drop
from a buffer with an open file then:FuzzyOpen
will work fine.Could be a bug with neovim.