Fix: automatic indent was broken when expanding <CR>.

This commit is contained in:
Israel Chauca Fuentes
2010-05-23 14:29:50 -05:00
parent 03342b8d22
commit e5ce5b0967

View File

@@ -442,19 +442,18 @@ function! delimitMate#MapMsg(msg) "{{{
endfunction "}}} endfunction "}}}
function! delimitMate#ExpandReturn() "{{{ function! delimitMate#ExpandReturn() "{{{
if delimitMate#WithinEmptyPair() && if delimitMate#WithinEmptyPair()
\ b:delimitMate_expand_cr
" Expand: " Expand:
call delimitMate#FlushBuffer() call delimitMate#FlushBuffer()
return "\<Esc>a\<CR>x\<CR>\<Esc>k$\"_xa" "return "\<Esc>a\<CR>x\<CR>\<Esc>k$\"_xa"
return "\<CR>\<UP>\<Esc>o"
else else
return "\<CR>" return "\<CR>"
endif endif
endfunction "}}} endfunction "}}}
function! delimitMate#ExpandSpace() "{{{ function! delimitMate#ExpandSpace() "{{{
if delimitMate#WithinEmptyPair() && if delimitMate#WithinEmptyPair()
\ b:delimitMate_expand_space
" Expand: " Expand:
call insert(b:delimitMate_buffer, 's') call insert(b:delimitMate_buffer, 's')
return delimitMate#WriteAfter(' ') . "\<Space>" return delimitMate#WriteAfter(' ') . "\<Space>"