mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 22:20:06 +08:00
parent
1cd9404d42
commit
0c5b68ab2a
@ -255,6 +255,7 @@ else
|
||||
endif
|
||||
|
||||
function! s:search_status() abort
|
||||
let save_cursor = getpos('.')
|
||||
let ct = 0
|
||||
let tt = 0
|
||||
let ctl = split(s:VIMCOMP.execute('keeppatterns .,$s/' . @/ . '//gn', 'silent!'), "\n")
|
||||
@ -265,6 +266,7 @@ function! s:search_status() abort
|
||||
if !empty(ctl)
|
||||
let tt = split(ttl[0])[0]
|
||||
endif
|
||||
keepjumps call setpos('.', save_cursor)
|
||||
return ' ' . (str2nr(tt) - str2nr(ct) + 1) . '/' . tt . ' '
|
||||
endfunction
|
||||
|
||||
|
@ -101,10 +101,10 @@ function! s:update_search_index(key) abort
|
||||
normal! N
|
||||
endif
|
||||
endif
|
||||
normal! ml
|
||||
let save_cursor = getpos('.')
|
||||
if !SpaceVim#layers#core#statusline#check_section('search status')
|
||||
call SpaceVim#layers#core#statusline#toggle_section('search status')
|
||||
endif
|
||||
let &l:statusline = SpaceVim#layers#core#statusline#get(1)
|
||||
normal! `l
|
||||
keepjumps call setpos('.', save_cursor)
|
||||
endfunction
|
||||
|
Loading…
Reference in New Issue
Block a user