You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 9, 2025. It is now read-only.
I have skimmed other issues to see if this bug has already been reported.
I'm fully certain that this is not a breaking change, see the latest release.
This plugin and its dependencies are up to date with the latest commit.
I'm willing to fix this through a PR.
Expected Behavior
If I just start a terminal by for instance running :call termopen(['ls'], {}), there is no winbar in the current window (the current window is occupied by the terminal buffer). This is the behavior that I expect from barbecue.
Now, I would also expect this behavior to be the same when doing the following set of actions
When calling the function defined above as :call TestBarbecue(), what I get is that there is a winbar in the window occupied by the terminal buffer. This is not expected (nor wanted, in my use case).
Removing the line call win_gotoid(l:orig_winid) restores the expected behavior, i.e. no winbar in the terminal window. Interestingly, keeping the line call win_gotoid(l:orig_winid) but adding a sleep 1m just before the call to termopen() also restores the expected behavior.
I've done some more digging, here's what I concluded:
By default, an update to the winbar is only performed on the events WinResized, BufWinEnter, CursorMoved, InsertLeave, as defined by barbecue. However, opening a terminal with e.g. termopen() does not trigger any of the above events. Nevertheless, when running the command passed to termopen(), some lines are appended to the terminal buffer, and this triggers CursorMoved as a side effect (or so it seems). This event is actually triggered two times when launching termopen() directly, but only one time when launching it as part of the function TestBarbecue() defined in the original description of this issue. This discrepancy seems to be enough for the unexpected behavior described above.
Given that, I would think that there should be an additional event that should perform a winbar update, and this event should be triggered when launching a terminal. More in general, there should be an event that's triggered whenever buftype changes for the current buffer, but as far as I know this only happens when launching a terminal.
Based on this assumption, I tried adding TermOpen to the list of events that perform a winbar update, but this does not solve the problem. The function update() in lua/barbecue/ui.lua does not seem to have the logic to disable the winbar for a buffer whose buftype has just changed.
Does this make sense?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Requirements
Expected Behavior
If I just start a terminal by for instance running
:call termopen(['ls'], {})
, there is no winbar in the current window (the current window is occupied by the terminal buffer). This is the behavior that I expect from barbecue.Now, I would also expect this behavior to be the same when doing the following set of actions
This is expressed by this function:
Actual Behavior
When calling the function defined above as
:call TestBarbecue()
, what I get is that there is a winbar in the window occupied by the terminal buffer. This is not expected (nor wanted, in my use case).Removing the line
call win_gotoid(l:orig_winid)
restores the expected behavior, i.e. no winbar in the terminal window. Interestingly, keeping the linecall win_gotoid(l:orig_winid)
but adding asleep 1m
just before the call totermopen()
also restores the expected behavior.Neovim Version
Minimal Configuration
Simple
init.vim
to reproduce the issue:Reproduction
TestBarbecue()
as specified in Expected Behavior:call TestBarbecue()
The text was updated successfully, but these errors were encountered: