-
Notifications
You must be signed in to change notification settings - Fork 255
[Cross-Plugin Bug] If a buffer is opened via the other plugins(fzf-lua), it will not be a listed buffer, thus cannot be shown by bufferline.nvim #321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have a few comments:
I find it very unlikely that Neo-tree could be affecting whether or not another buffer is listed or not. There is a slim possibility that it could affect which buffer is focused though, especially if Neo-tree was the focused window when you tried to open a new buffer. |
Can. But it takes some time since my config is a little bit messy. I might post it and tag you later.
Got it. Now I'm using
This works. I moved back to
|
Have the same behavior with Telescope. |
I was able to recreate this with Telescope with |
This should be fixed now in |
Works for me. |
@cseickel I think the bug has not been fixed? I mean, is it possible to correctly switch to the selected file/window by fzf-lua when the command is called upon current neo-tree (floating) window? |
@nyngwang It works fine for me. I am testing with Telescope instead of fzf, but I wouldn't expect that to make a difference. Are you still having a problem opening files as listed when a Neotree float was the prior window? |
@cseickel Sorry for my late reply, sleeping. I have tested removing these checks but the results are the same as in the video in this thread. Let me test it again now. vim.keymap.set('n', '<C-G>', function ()
-- Close neo-tree before running fzf-lua
if vim.bo.filetype == 'neo-tree' then vim.cmd('wincmd h') end
require('fzf-lua').files()
end, NOREF_NOERR_TRUNC)
vim.keymap.set('n', '<Leader>gs', function ()
if vim.bo.filetype == 'neo-tree' then vim.cmd('wincmd h') end
require('fzf-lua').git_status()
end, NOREF_NOERR_TRUNC) update: Yes, still the same result. But anyway I think we can stop here because I have migrated to |
Uh oh!
There was an error while loading. Please reload this page.
Continued from #305 (comment). While the double-
[No Name]
has been resolved, I forgot to test the interaction between neo-tree and fzf-lua. I found that:set buflisted?
isnobuflisted
. This means that the problem is not from bufferline.nvim, it is working correctly: ignore not-listed buffers.nvim
process and wanted to create the first window/buffer for the file selected via fzf-lua, as the two DEMO below. No such problem if there is already a buffer loaded/listed in the background.So it seems that the interaction between neo-tree.nvim and fzf-lua will somehow cause a buffer loaded with
nobuflisted
, thus the buffer is not displayed by bufferline.nvim.UPDATE:
In my experiments, these combinations didn't work as expected: (all testings use
hijack_netrw_behavior = 'open_default'
, if I change it to'open_current'
the problem of 2. will disappear, i.e. the buffer from fzf-lua selection will get listed.)position = 'float'
+ fzf-lua selection: While the file did get listed, the current buffer becomes (the only)[No Name]
.bufferline_bug_2.mov
position = 'left' / 'right'
+ fzf-lua selection: The current buffer did load the file content, but itsset buflisted?
returnsnobuflisted
.bufferline_bug_1.mov
The text was updated successfully, but these errors were encountered: