mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-13 15:48:00 +08:00
fix(iedit): handle empty cursor_stack
This commit is contained in:
parent
e1338de477
commit
2288bf7db2
@ -204,7 +204,7 @@ function! SpaceVim#plugins#iedit#start(...) abort
|
|||||||
endif
|
endif
|
||||||
call s:highlight_cursor()
|
call s:highlight_cursor()
|
||||||
redrawstatus!
|
redrawstatus!
|
||||||
while s:mode !=# ''
|
while s:mode !=# '' && len(s:cursor_stack) > 0
|
||||||
redraw!
|
redraw!
|
||||||
let char = s:VIM.getchar()
|
let char = s:VIM.getchar()
|
||||||
if s:mode ==# 'n' && char ==# "\<Esc>"
|
if s:mode ==# 'n' && char ==# "\<Esc>"
|
||||||
@ -213,6 +213,10 @@ function! SpaceVim#plugins#iedit#start(...) abort
|
|||||||
let symbol = s:handle(s:mode, char)
|
let symbol = s:handle(s:mode, char)
|
||||||
endif
|
endif
|
||||||
endwhile
|
endwhile
|
||||||
|
if len(s:cursor_stack) == 0
|
||||||
|
normal! :
|
||||||
|
echo 'Pattern not found:' . symbol
|
||||||
|
endif
|
||||||
let s:cursor_stack = []
|
let s:cursor_stack = []
|
||||||
let s:index = -1
|
let s:index = -1
|
||||||
let s:mode = ''
|
let s:mode = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user