From 1c0810b61326d9007c15c2c16c84f870013572e1 Mon Sep 17 00:00:00 2001 From: Wang Shidong Date: Wed, 11 Jul 2018 20:34:38 +0800 Subject: [PATCH] Fix Statusline of inactive windows (#1913) * Fix inactive statusline * Fix inactive statusline --- autoload/SpaceVim/autocmds.vim | 1 - autoload/SpaceVim/layers/core/statusline.vim | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/SpaceVim/autocmds.vim b/autoload/SpaceVim/autocmds.vim index f413768cc..f34282418 100644 --- a/autoload/SpaceVim/autocmds.vim +++ b/autoload/SpaceVim/autocmds.vim @@ -27,7 +27,6 @@ function! SpaceVim#autocmds#init() abort autocmd BufEnter,WinEnter,InsertLeave * setl cursorcolumn autocmd BufLeave,WinLeave,InsertEnter * setl nocursorcolumn endif - autocmd WinLeave * call SpaceVim#layers#core#statusline#remove_section('search status') autocmd BufReadPost * \ if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal! g`\"" | diff --git a/autoload/SpaceVim/layers/core/statusline.vim b/autoload/SpaceVim/layers/core/statusline.vim index a1ed1f69f..7a1cd5848 100644 --- a/autoload/SpaceVim/layers/core/statusline.vim +++ b/autoload/SpaceVim/layers/core/statusline.vim @@ -444,6 +444,7 @@ function! SpaceVim#layers#core#statusline#init() abort autocmd! autocmd BufWinEnter,WinEnter,FileType \ * let &l:statusline = SpaceVim#layers#core#statusline#get(1) + autocmd WinLeave * call SpaceVim#layers#core#statusline#remove_section('search status') autocmd BufWinLeave,WinLeave * let &l:statusline = SpaceVim#layers#core#statusline#get() autocmd ColorScheme * call SpaceVim#layers#core#statusline#def_colors() augroup END