mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 17:40:06 +08:00
Only replace current screen
This commit is contained in:
parent
aaf9cd70f0
commit
ce5333c795
@ -31,6 +31,7 @@ let s:grepid = 0
|
|||||||
|
|
||||||
" grep local funcs:{{{
|
" grep local funcs:{{{
|
||||||
" @vimlint(EVL103, 1, a:timer)
|
" @vimlint(EVL103, 1, a:timer)
|
||||||
|
let s:current_grep_pattern = ''
|
||||||
function! s:grep_timer(timer) abort
|
function! s:grep_timer(timer) abort
|
||||||
let s:current_grep_pattern = join(split(s:grep_expr), '.*')
|
let s:current_grep_pattern = join(split(s:grep_expr), '.*')
|
||||||
let cmd = s:get_search_cmd(s:current_grep_pattern)
|
let cmd = s:get_search_cmd(s:current_grep_pattern)
|
||||||
@ -147,9 +148,11 @@ function! s:start_replace() abort
|
|||||||
call matchdelete(s:hi_id)
|
call matchdelete(s:hi_id)
|
||||||
catch
|
catch
|
||||||
endtr
|
endtr
|
||||||
redrawstatus
|
|
||||||
let replace_text = s:current_grep_pattern
|
let replace_text = s:current_grep_pattern
|
||||||
call SpaceVim#plugins#iedit#start({'expr' : replace_text})
|
if !empty(replace_text)
|
||||||
|
call SpaceVim#plugins#iedit#start({'expr' : replace_text}, line('w0'), line('w$'))
|
||||||
|
endif
|
||||||
|
redrawstatus
|
||||||
endfunction
|
endfunction
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user