[fixup] Release the search restriction and remove unnecessary functions

This commit is contained in:
kazukazuinaina 2020-07-28 16:29:42 +09:00
parent 2a027e992d
commit 1ca2428f51
1 changed files with 1 additions and 12 deletions

View File

@ -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