Bug: FuzzyyBuffers doesn't list buffers added with :badd
Closed this issue · 10 comments
I noticed that after loading a previously saved Vim session, FuzzyyBuffers would show just the currently opened file instead of all the files that are listed with :ls. The reason seems to be that they are added to Vim using :badd.
Got similar issue. If:
- open vim
- open file A with FuzzyFile
- open file B with FuzzyFile
- call FuzzyBuffers,
then in list appears only current buffer, when :ls shows all of them
This is because when you open a session, all the buffers is listed but not loaded(behavior of :badd). You can solve this by changing line 62 of autoload/fuzzy/buffers.vim
var buf_data = getbufinfo({'buflisted': 1, 'bufloaded': 1})
into
var buf_data = getbufinfo({'buflisted': 1, 'bufloaded': 0})
However, this will cause some undesired buffer such as Vista be loaded if you use such plugin.
I am investigating if there is a perfect solution. Suggestions are welcome.
Got similar issue. If:
- open vim
- open file A with FuzzyFile
- open file B with FuzzyFile
- call FuzzyBuffers,
then in list appears only current buffer, when :ls shows all of them
I didn't run into this bug. Did you open file using enter key or ctrl-v in FuzzyFiles?
Got similar issue. If:
- open vim
- open file A with FuzzyFile
- open file B with FuzzyFile
- call FuzzyBuffers,
then in list appears only current buffer, when :ls shows all of themI didn't run into this bug. Did you open file using enter key or ctrl-v in FuzzyFiles?
Files was opened by pressing enter. Behaviour changed if replace
getbufinfo({'buflisted': 1, 'bufloaded': 0})
to
getbufinfo() or getbufinfo({'buflisted': 1})
Got similar issue. If:
- open vim
- open file A with FuzzyFile
- open file B with FuzzyFile
- call FuzzyBuffers,
then in list appears only current buffer, when :ls shows all of themI didn't run into this bug. Did you open file using enter key or ctrl-v in FuzzyFiles?
Files was opened by pressing enter. Behaviour changed if replace
getbufinfo({'buflisted': 1, 'bufloaded': 0})togetbufinfo()orgetbufinfo({'buflisted': 1})
I see. Since the the original code snippet is
var buf_data = getbufinfo({'buflisted': 1, 'bufloaded': 1})
I guess this is a bug introduced after you modified the code?
Got similar issue. If:
- open vim
- open file A with FuzzyFile
- open file B with FuzzyFile
- call FuzzyBuffers,
then in list appears only current buffer, when :ls shows all of themI didn't run into this bug. Did you open file using enter key or ctrl-v in FuzzyFiles?
Files was opened by pressing enter. Behaviour changed if replace
getbufinfo({'buflisted': 1, 'bufloaded': 0})togetbufinfo()orgetbufinfo({'buflisted': 1})I see. Since the the original code snippet is
var buf_data = getbufinfo({'buflisted': 1, 'bufloaded': 1})I guess this is a bug introduced after you modified the code?
No. Bug appeared with original code, i modified it and problem gone. GitDiff from my fork:
- var buf_data = getbufinfo({'buflisted': 1, 'bufloaded': 1})
+ var buf_data = getbufinfo({'buflisted': 1})
Please check the latest commit. FuzzyBuffer will display unloaded buffer now. And you can exclude any undesired buffers by define g:fuzzyy_buffers_exclude global variable.
Please check the latest commit. FuzzyBuffer will display unloaded buffer now. And you can exclude any undesired buffers by define g:fuzzyy_buffers_exclude global variable.
Good. I'll check it out. I've done feature with custom ignore list for find, powershell, fd. Can i push it to main branch (pull request ofk)?
Please check the latest commit. FuzzyBuffer will display unloaded buffer now. And you can exclude any undesired buffers by define g:fuzzyy_buffers_exclude global variable.
Good. I'll check it out. I've done feature with custom ignore list for find, powershell, fd. Can i push it to main branch (pull request ofk)?
PRs are always welcomed! I am happy to check it out.
Works great, thanks! I didn't check the exclude option though.