1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 21:00:03 +08:00

feat(statusline): clear searching status for no exist pattern

This commit is contained in:
wsdjeg 2022-03-20 17:00:28 +08:00
parent deb08e43aa
commit 0fa70e1757

View File

@ -286,7 +286,11 @@ function! s:search_status() abort
" errmsg in this function should be ignored, otherwise SPC f s will always
" print errmsg.
let v:errmsg = ''
return ' ' . (str2nr(tt) - str2nr(ct) + 1) . '/' . tt . ' '
if tt ==# 0
return ''
else
return ' ' . (str2nr(tt) - str2nr(ct) + 1) . '/' . tt . ' '
endif
endfunction