Skip to content

Commit df02671

Browse files
authored
Check the current window status line before updating it (#54)
1 parent b492a57 commit df02671

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

autoload/tpipeline/lualine.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ endfunc
1515

1616
func tpipeline#lualine#clear_all_stl()
1717
for i in range(1, tabpagewinnr(tabpagenr(), '$'))
18-
noa call win_execute(win_getid(i), 'setlocal stl<')
18+
noa let s = getwinvar(win_getid(i), '&stl')
19+
" Resetting the statusline may interfere with typing in that window,
20+
" check for current statusline value before resetting it.
21+
if !empty(s) && s !=# '%#StatusLine#'
22+
noa call win_execute(win_getid(i), 'setlocal stl<')
23+
endif
1924
endfor
2025
endfunc
2126

0 commit comments

Comments
 (0)