neovim-gtk
neovim-gtk copied to clipboard
Tabline never visible unless a new tab is opened through the new tab icon
Like the title says, regardless of the Tabline
setting, the tabline is never shown, unless
a new tab is manually created by clicking on the Open a new tab
icon on the window decorations (which I don't even use).
This is a regression from the fork at daa84/neovim-gtk, where the tabline is correctly shown on startup.
I should mention I'm using https://github.com/romgrk/barbar.nvim, which kind of blurs the boundary between a tab and a buffer.
Hey guys,
Not sure if you are speaking of neovim's tabline or the external (gtk) one.
I personally like a clean interface and the fact that the gtk tabline only displays if there are more than one tab. It is very similar to how vim-gtk3 used to work. For example:
So, if there is going to be a change to always display the tab even with only one file open, I would like to kindly ask to make that a preference so that one can choose if they want that or not.
I should mention I'm using https://github.com/romgrk/barbar.nvim, which kind of blurs the boundary between a tab and a buffer.
@cyanreg I forgot to ask - does this happen without the plugin enabled? (I am willing to fix it either way JFYI, would just like to know if I need to setup the plugin before getting started)
Hey guys,
Not sure if you are speaking of neovim's tabline or the external (gtk) one.
@cyanreg this would also be good to know
I personally like a clean interface and the fact that the gtk tabline only displays if there are more than one tab. It is very similar to how vim-gtk3 used to work. … So, if there is going to be a change to always display the tab even with only one file open, I would like to kindly ask to make that a preference so that one can choose if they want that or not.
I've got no plans of changing any defaults
Happens with or without barbar. I'm talking about the internal tabline, but it really happens with both - neither are visible with the plugins I have. My understanding of the tabline setting is that it disables the external tabline, which is what I'd like.
I forgot to mention this before but:
Like the title says, regardless of the
Tabline
setting, the tabline is never shown, unless a new tab is manually created by clicking on theOpen a new tab
icon on the window decorations (which I don't even use).
JFYI, the "Open a new tab" button just calls :tabc
Anyway-sorry, I'm still not entirely sure what the issue you're describing is here. I took a guess based on the description here and tried sticking:
call rpcnotify(1, 'Gui', 'Option', 'Tabline', 0)
Into my init.vim
, and from my experiments it seemed the non-external tabline would come up by default. If I tried running neovim-gtk like so though:
nvim-gtk --no-fork -- -p /tmp/1 /tmp/2
The external tabline would be used and the internal one would be used. But the behavior was pretty much identical in both me and daa84's versions, so I'm not convinced I'm reproducing what you're doing closely enough. I guess it would be helpful to know how are you actually starting up neovim-gtk, and any tabline related settings in your init.vim
.
Additionally though, I have a feeling that whatever situation where you're getting the internal tabline to be shown at the right time in daa84 might just be some lucky result of your vim setup if I'm not able to reproduce it here - but I'm not sure. The problem is the whole Tabline
option just seems to be broken enough that I wouldn't expect it to work consistently for anyone, as the code for it in redraw_handler
in both me and daa84's versions don't appear to take care to actually update the state of the GTK tabline widgets. The only thing it does is update the ext_tabline
option in nvim GTK itself, which does at least tell nvim to start/stop sending tabline events.
I have a feeling if I add the appropriate code for updating the visibility of the tabline widget, then this issue might go away. Additionally though, is showtabline
involved here at all - seeing as you mentioned needing to open a new tab? I'd definitely need to add some additional code for reading showtabline
on startup to nvim-gtk so we can modify the default visibility behavior of the GUI tabline.
@cyanreg could you try this commit and verify that it fixes your issue?
Tested, didn't change anything. Regardless of the tabline setting, I'm getting neither a GTK tabline, or the native tabline.
Tested, didn't change anything. Regardless of the tabline setting, I'm getting neither a GTK tabline, or the native tabline.
Just to be clear we're talking about showtabline
, right?
No, about call rpcnotify(1, 'Gui', 'Option', 'Tabline', 0)
?
I'm not seeing showtabline
anywhere.
I'm not able to replicate this, my native tabline (the light blue bar below) shows up immediately when opening a new window.
Are you sure this isn't a duplicate of #13? I've gotten so used to resizing on start to fix that that I didn't notice that the tabline sometimes doesn't show up until afterward.