From 9d1dd5116c13b6d850a81291422a4a9818622b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Gro=C3=9F?= Date: Mon, 6 Feb 2023 22:12:16 +0100 Subject: [PATCH] Only adopt stl option updates in global scope 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. --- autoload/tpipeline.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/tpipeline.vim b/autoload/tpipeline.vim index 5f2cc54..e7d5662 100644 --- a/autoload/tpipeline.vim +++ b/autoload/tpipeline.vim @@ -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