Improve clear markers behavior

This commit is contained in:
Shougo Matsushita 2015-08-29 09:27:32 +09:00
parent 8cd4224432
commit 58ed397963
1 changed files with 3 additions and 1 deletions

View File

@ -138,6 +138,7 @@ function! neosnippet#commands#_clear_markers() "{{{
" Get patterns and count.
if !&l:modifiable
\ || !&l:modified
\ || empty(expand_stack)
\ || neosnippet#variables#current_neosnippet().trigger
return
@ -152,6 +153,7 @@ function! neosnippet#commands#_clear_markers() "{{{
\ expand_info.end_line,
\ expand_info.end_patterns)
let mode = mode()
let pos = getpos('.')
" Found snippet.
@ -170,7 +172,7 @@ function! neosnippet#commands#_clear_markers() "{{{
let found = 1
endif
finally
if found
if found && mode !=# 'i'
stopinsert
endif