[fixup] Release the search restriction and remove unnecessary functions
This commit is contained in:
parent
2a027e992d
commit
1ca2428f51
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue