From 16b5e83537ed3b71f6ed5af37d0e237e49108d88 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Tue, 27 Jun 2017 16:47:43 +0800 Subject: [PATCH] Fix search_index after :noh Thanks: markzen: keeppa %s,pattern,,gn Patch 7.4.083 --- autoload/SpaceVim/layers/core/statusline.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/SpaceVim/layers/core/statusline.vim b/autoload/SpaceVim/layers/core/statusline.vim index abc34f2f8..0b5e1d7bb 100644 --- a/autoload/SpaceVim/layers/core/statusline.vim +++ b/autoload/SpaceVim/layers/core/statusline.vim @@ -78,11 +78,11 @@ endfunction function! s:search_status() abort let ct = 0 let tt = 0 - let ctl = split(s:VIMCOMP.execute('.,$s/' . @/ . '//gn', 'silent!'), "\n") + let ctl = split(s:VIMCOMP.execute('keeppatterns .,$s/' . @/ . '//gn', 'silent!'), "\n") if !empty(ctl) let ct = split(ctl[0])[0] endif - let ttl = split(s:VIMCOMP.execute('%s/' . @/ . '//gn', 'silent!'), "\n") + let ttl = split(s:VIMCOMP.execute('keeppatterns %s/' . @/ . '//gn', 'silent!'), "\n") if !empty(ctl) let tt = split(ttl[0])[0] endif