daa84 / neovim-gtk

gtk ui for neovim
GNU General Public License v3.0
718 stars 56 forks source link

Bad initial render of TUI tabline #49

Open davidsierradz opened 6 years ago

davidsierradz commented 6 years ago

Stack versions:

OS: Manjaro i3 17.1.1 GTK: 3.22.26+47+g3a1a7135a2-3 Neovim: v0.2.3-385-gb616ef9b2 Neovim-GTK: master

Minimal setup:

init.vim

set showtabline=2

ginit.vim:

if exists('g:GtkGuiLoaded')
    call rpcnotify(1, 'Gui', 'Font', 'Hack Nerd Font Mono 12')
    call rpcnotify(1, 'Gui', 'Option', 'Tabline', 0)
    call rpcnotify(1, 'Gui', 'Option', 'Popupmenu', 0)
    let g:GuiInternalClipboard = 1
endif

Open nvim-gtk (does not show tabline): 2018-01-09-152503_1366x768_scrot

Type Ex command :help (the command line gets over-rendered by the statusline and the tabline is rendered): 2018-01-09-152510_1366x768_scrot

See I am writing :help again (notice the statusline): 2018-01-09-152521_1366x768_scrot

I open the command-line window q:: 2018-01-09-152545_1366x768_scrot

Change the font: 2018-01-09-152551_1366x768_scrot

All is good!: 2018-01-09-152559_1366x768_scrot

If I resize the neovim-gtk window also fix the rendering, like changing the font size: 2018-01-09-152803_1366x768_scrot

daa84 commented 6 years ago

Looks more like bug in neovim, as it does not process option change properly after application starts. Possible solution is just send some event (think resize) to neovim when this option changed, so this force ui update. Or just simple put this option before font change option 😆