Simplify folding fix
This commit is contained in:
parent
5b78c5c6f6
commit
aa0bc464fa
@ -549,11 +549,6 @@ function! neosnippet#expand(cur_text, col, trigger_name)"{{{
|
|||||||
\ '<|\1|>', 'g')
|
\ '<|\1|>', 'g')
|
||||||
|
|
||||||
" Insert snippets.
|
" Insert snippets.
|
||||||
if has('folding')
|
|
||||||
let foldmethod = &l:foldmethod
|
|
||||||
let &l:foldmethod = 'manual'
|
|
||||||
endif
|
|
||||||
|
|
||||||
let next_line = getline('.')[a:col-1 :]
|
let next_line = getline('.')[a:col-1 :]
|
||||||
let snippet_lines = split(snip_word, '\n', 1)
|
let snippet_lines = split(snip_word, '\n', 1)
|
||||||
if empty(snippet_lines)
|
if empty(snippet_lines)
|
||||||
@ -572,6 +567,10 @@ function! neosnippet#expand(cur_text, col, trigger_name)"{{{
|
|||||||
call append('.', snippet_lines[1:])
|
call append('.', snippet_lines[1:])
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if has('folding')
|
||||||
|
silent! execute begin_line . ',' . end_line . 'foldopen!'
|
||||||
|
endif
|
||||||
|
|
||||||
call s:indent_snippet(begin_line, end_line)
|
call s:indent_snippet(begin_line, end_line)
|
||||||
|
|
||||||
let begin_patterns = (begin_line > 1) ?
|
let begin_patterns = (begin_line > 1) ?
|
||||||
@ -592,11 +591,6 @@ function! neosnippet#expand(cur_text, col, trigger_name)"{{{
|
|||||||
startinsert!
|
startinsert!
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if has('folding')
|
|
||||||
let &l:foldmethod = foldmethod
|
|
||||||
silent execute begin_line . ',' . end_line . 'foldopen!'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if snip_word =~ s:get_placeholder_marker_pattern()
|
if snip_word =~ s:get_placeholder_marker_pattern()
|
||||||
call s:snippets_jump(a:cur_text, a:col)
|
call s:snippets_jump(a:cur_text, a:col)
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user