Schedule a redraw of tabline when setting tabline (#520)
* Schedule a redraw of tabline when setting tabline The tabline isn't drawn until scrolling the window or opening another file. Opening multiple files at once (e.g. nvim a.txt b.txt) will only show the first. By performing a deferred redraw of the tabline this fixes this startup behaviour problem. * Changed to use vim.schedule
This commit is contained in:
parent
c2107f52e1
commit
a11f6d15d4
|
@ -258,6 +258,9 @@ local function set_tabline()
|
|||
if next(config.tabline) ~= nil then
|
||||
vim.go.tabline = "%{%v:lua.require'lualine'.tabline()%}"
|
||||
vim.go.showtabline = 2
|
||||
vim.schedule(function()
|
||||
vim.api.nvim_command('redrawtabline')
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue