- Fixed indentation.
This commit is contained in:
parent
a725f55bfc
commit
40fb2b4877
@ -582,10 +582,8 @@ function! neosnippet#expand(cur_text, col, trigger_name)"{{{
|
||||
call append('.', snippet_lines[1:])
|
||||
endif
|
||||
|
||||
let neosnippet = neosnippet#get_current_neosnippet()
|
||||
|
||||
call s:indent_snippet(
|
||||
\ ((neosnippet.target == '' && snippet.options.indent) ?
|
||||
\ ((begin_line != end_line || snippet.options.indent) ?
|
||||
\ begin_line : begin_line + 1), end_line)
|
||||
|
||||
let begin_patterns = (begin_line > 1) ?
|
||||
@ -651,11 +649,13 @@ function! s:indent_snippet(begin, end)"{{{
|
||||
let equalprg = &l:equalprg
|
||||
let pos = getpos('.')
|
||||
|
||||
let neosnippet = neosnippet#get_current_neosnippet()
|
||||
|
||||
try
|
||||
setlocal equalprg=
|
||||
|
||||
" Check use of indent plugin.
|
||||
if getline(a:begin+1) !~ '^\t\+'
|
||||
if neosnippet.target == '' && getline(a:begin+1) !~ '^\t\+'
|
||||
" Indent begin line.
|
||||
call cursor(a:begin, 0)
|
||||
silent normal! ==
|
||||
|
@ -540,6 +540,7 @@ CHANGELOG *neosnippet-changelog*
|
||||
- Added indent option.
|
||||
- Added <Plug>(neosnippet_register_oneshot_snippet).
|
||||
- Refactored snippets files.
|
||||
- Fixed indentation.
|
||||
|
||||
2012-10-29
|
||||
- Improved parse of snippets file.
|
||||
|
Loading…
Reference in New Issue
Block a user