From 58ed397963897a1de365384872decc8b8fc42f28 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Sat, 29 Aug 2015 09:27:32 +0900 Subject: [PATCH] Improve clear markers behavior --- autoload/neosnippet/commands.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/neosnippet/commands.vim b/autoload/neosnippet/commands.vim index 93e9d69..297d9df 100644 --- a/autoload/neosnippet/commands.vim +++ b/autoload/neosnippet/commands.vim @@ -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