mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:10:04 +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:{{{
|
||||
" @vimlint(EVL103, 1, a:timer)
|
||||
let s:current_grep_pattern = ''
|
||||
function! s:grep_timer(timer) abort
|
||||
let s:current_grep_pattern = join(split(s:grep_expr), '.*')
|
||||
let cmd = s:get_search_cmd(s:current_grep_pattern)
|
||||
@ -147,9 +148,11 @@ function! s:start_replace() abort
|
||||
call matchdelete(s:hi_id)
|
||||
catch
|
||||
endtr
|
||||
redrawstatus
|
||||
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
|
||||
" }}}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user