Improve clear markers behavior
This commit is contained in:
parent
8cd4224432
commit
58ed397963
@ -138,6 +138,7 @@ function! neosnippet#commands#_clear_markers() "{{{
|
|||||||
|
|
||||||
" Get patterns and count.
|
" Get patterns and count.
|
||||||
if !&l:modifiable
|
if !&l:modifiable
|
||||||
|
\ || !&l:modified
|
||||||
\ || empty(expand_stack)
|
\ || empty(expand_stack)
|
||||||
\ || neosnippet#variables#current_neosnippet().trigger
|
\ || neosnippet#variables#current_neosnippet().trigger
|
||||||
return
|
return
|
||||||
@ -152,6 +153,7 @@ function! neosnippet#commands#_clear_markers() "{{{
|
|||||||
\ expand_info.end_line,
|
\ expand_info.end_line,
|
||||||
\ expand_info.end_patterns)
|
\ expand_info.end_patterns)
|
||||||
|
|
||||||
|
let mode = mode()
|
||||||
let pos = getpos('.')
|
let pos = getpos('.')
|
||||||
|
|
||||||
" Found snippet.
|
" Found snippet.
|
||||||
@ -170,7 +172,7 @@ function! neosnippet#commands#_clear_markers() "{{{
|
|||||||
let found = 1
|
let found = 1
|
||||||
endif
|
endif
|
||||||
finally
|
finally
|
||||||
if found
|
if found && mode !=# 'i'
|
||||||
stopinsert
|
stopinsert
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user