From 1ca2428f515b726e4fae20c2d4966dc19133dda1 Mon Sep 17 00:00:00 2001 From: kazukazuinaina Date: Tue, 28 Jul 2020 16:29:42 +0900 Subject: [PATCH] [fixup] Release the search restriction and remove unnecessary functions --- autoload/airline/extensions/searchcount.vim | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/autoload/airline/extensions/searchcount.vim b/autoload/airline/extensions/searchcount.vim index 6543eb46..3213f1ec 100644 --- a/autoload/airline/extensions/searchcount.vim +++ b/autoload/airline/extensions/searchcount.vim @@ -18,7 +18,7 @@ function! airline#extensions#searchcount#apply(...) abort endfunction function! airline#extensions#searchcount#status() abort - let result = searchcount(#{recompute: 1}) + let result = searchcount(#{recompute: 1, maxcount: -1}) if empty(result) || result.total ==# 0 return '' endif @@ -37,14 +37,3 @@ function! airline#extensions#searchcount#status() abort return printf('%s[%d/%d]', @/, \ result.current, result.total) endfunction - -autocmd CursorMoved * - \ let s:searchcount_timer = timer_start( - \ 10, function('s:update_searchcount')) - -function! s:update_searchcount(timer) abort - if a:timer ==# s:searchcount_timer - call searchcount(#{ - \ recompute: 1, maxcount: 0, timeout: 100}) - endif -endfunction