-
Notifications
You must be signed in to change notification settings - Fork 38
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
fix(winbar): don't modify non-heirline winbar for disabled buffers #166
Conversation
d7718d8
to
b482f1c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that sounds sensible, it should also be tested launching nvim with file arguments
btw, I realised I encountered this problem with Neo-tree and I used this work around disable_winbar_cb = function(args)
if vim.bo[args.buf].filetype == "neo-tree" then
return
end
return conditions.buffer_matches({
buftype = { "nofile", "prompt", "help", "quickfix" },
filetype = { "^git.*", "fugitive", "Trouble", "dashboard" },
}, args.buf)
end, |
@rebelot I update my commit to fix that
Is this being taken care of in that |
Great, that's all. The autocmd should take care of startup, I just wanted to make sure that this PR does not screw up winbars when launching nvim with multiple arguments (usually diff mode, if not taken care of, only the first buffer will have the winbar set due to some autocmd hell) |
@rebelot have you had a chance to test this out with all of the arguments you wanted to? :) |
Hey @rebelot just wanted to do a quick bump on this to see if you've had a chance to test it out? |
Hey @rebelot, I'm sorry to be an annoyance and keep pinging. Is there any chance this is able to get merged yet? |
I have tested this with many different starting arguments and situations (opening multiple files at once, opening several files in splits, etc.) and it doesn't appear to have any issues at all. |
Hi @mehalter , I am very sorry for the delay in getting back to this! |
No worries at all! I appreciate all your work on this project :) no need to apologize for taking some time away, open source maintenance can be taxing! |
Rather than setting disabled buffers to
nil
it would be better to just leave the winbar untouched if it was not previously set by Heirline. This is much better for buffers that want to handle their own winbar entirely such asneo-tree
which can lead to some major flickering.Let me know what you think or maybe if we want to add a separate option for this case like
disable_winbar_cb
andignore_winbar_cb
, but I thought that might end up being a bit confusing to the user.Example flickering: