Skip to content

Commit 4313c71

Browse files
committed
Move lualine workarounds to extra file
1 parent 7c94396 commit 4313c71

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

autoload/tpipeline.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ func tpipeline#build_hooks()
3434

3535
if empty(g:tpipeline_statusline) && !g:tpipeline_tabline
3636
if g:tpipeline_clearstl
37-
if tpipeline#util#is_lualine()
38-
au OptionSet statusline if v:option_type == 'local' | call tpipeline#util#clear_all_stl() | endif
39-
au ModeChanged * call tpipeline#util#clear_all_stl()
37+
if tpipeline#lualine#is_lualine()
38+
au OptionSet statusline if v:option_type == 'local' | call tpipeline#lualine#clear_all_stl() | endif
39+
au ModeChanged * call tpipeline#lualine#clear_all_stl()
4040
endif
4141
au OptionSet statusline if v:option_type == 'global' | call tpipeline#util#clear_stl() | endif
4242
endif

autoload/tpipeline/lualine.vim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
func tpipeline#lualine#is_lualine()
2+
" lualine doesn't play nice, so it needs extra workarounds
3+
return has('nvim') && !empty(nvim_get_autocmds(#{group: "lualine"}))
4+
endfunc
5+
6+
func tpipeline#lualine#clear_all_stl()
7+
for i in range(1, tabpagewinnr(tabpagenr(), '$'))
8+
call win_execute(win_getid(i), 'setlocal stl<')
9+
endfor
10+
endfunc

autoload/tpipeline/util.vim

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,3 @@ func tpipeline#util#clear_stl()
2929
let g:tpipeline_statusline = &stl
3030
set stl=%#StatusLine#
3131
endfunc
32-
33-
func tpipeline#util#is_lualine()
34-
" lualine doesn't play nice, so it needs extra workarounds
35-
return has('nvim') && !empty(nvim_get_autocmds(#{group: "lualine"}))
36-
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-
endfunc

0 commit comments

Comments
 (0)