Skip to content

Commit 14cd2d4

Browse files
committed
Improve clear_stl for lualine
lualine seems to be setting the local statusline option for almost all windows [0]. This patch mostly fixes the problem, but there is only one slight issue remaining with command mode, but apparently that seems to be an issue with lualine itself too [1]. See [2] for more info. [0] https://github.com/nvim-lualine/lualine.nvim/blob/2ac8d77575926d5c22f1d13f3e48000d579277e3/lua/lualine.lua#L421 [1] https://github.com/nvim-lualine/lualine.nvim/blob/2ac8d77575926d5c22f1d13f3e48000d579277e3/lua/lualine.lua#L330 [2] commit 8cc0de6 Seems to help with #51 P.S. Fuck lualine
1 parent 4890739 commit 14cd2d4

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

autoload/tpipeline.vim

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ func tpipeline#build_hooks()
3535
if empty(g:tpipeline_statusline) && !g:tpipeline_tabline
3636
if g:tpipeline_clearstl
3737
if tpipeline#util#is_lualine()
38-
au OptionSet statusline call tpipeline#util#clear_stl()
39-
else
40-
au OptionSet statusline if v:option_type == 'global' | call tpipeline#util#clear_stl() | endif
38+
au OptionSet statusline if v:option_type == 'local' | call tpipeline#util#clear_all_stl() | endif
4139
endif
40+
au OptionSet statusline if v:option_type == 'global' | call tpipeline#util#clear_stl() | endif
4241
endif
4342
au OptionSet statusline call tpipeline#update()
4443
endif

autoload/tpipeline/util.vim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,10 @@ func tpipeline#util#is_lualine()
3434
" lualine doesn't play nice, so it needs extra workarounds
3535
return has('nvim') && !empty(nvim_get_autocmds(#{group: "lualine"}))
3636
endfunc
37+
38+
func tpipeline#util#clear_all_stl()
39+
for i in range(1, tabpagewinnr(tabpagenr(), '$'))
40+
call win_execute(win_getid(i), 'setlocal stl<')
41+
endfor
42+
redrawstatus!
43+
endfunc

0 commit comments

Comments
 (0)