Skip to content

Commit

Permalink
Only adopt stl option updates in global scope
Browse files Browse the repository at this point in the history
Otherwise if some window updates the stl option locally and doesn't
reset if afterwards, it may be stuck there forever.
For example this was the case with CocList outline.

This may be improved on further in the future by storing a list of local
stl option values and selectively switching to them if that window is
the currently active window.

For now just ignoring these local stl option updates should be fine
though.
  • Loading branch information
vimpostor committed Feb 6, 2023
1 parent 0dfb1bf commit 9d1dd51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/tpipeline.vim
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func tpipeline#init_statusline()
if g:tpipeline_clearstl
let g:tpipeline_statusline = &stl
set stl=%#StatusLine#
au OptionSet statusline let g:tpipeline_statusline = &stl | set stl=%#StatusLine# | call tpipeline#update()
au OptionSet statusline if v:option_type == 'global' | let g:tpipeline_statusline = &stl | set stl=%#StatusLine# | call tpipeline#update() | endif
endif
endif
endif
Expand Down

0 comments on commit 9d1dd51

Please sign in to comment.