mirror of
https://github.com/Raimondi/delimitMate.git
synced 2026-10-26 15:43:20 +08:00
Fix: automatic indent was broken when expanding <CR>.
This commit is contained in:
1 parent
03342b8d22
commit
e5ce5b0967
1 file changed
+4
-5
@@ -442,19 +442,18 @@ function! delimitMate#MapMsg(msg) "{{{
|
||||
endfunction "}}}
|
||||
|
||||
function! delimitMate#ExpandReturn() "{{{
|
||||
if delimitMate#WithinEmptyPair() &&
|
||||
\ b:delimitMate_expand_cr
|
||||
if delimitMate#WithinEmptyPair()
|
||||
" Expand:
|
||||
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
|
||||
return "\<CR>"
|
||||
endif
|
||||
endfunction "}}}
|
||||
|
||||
function! delimitMate#ExpandSpace() "{{{
|
||||
if delimitMate#WithinEmptyPair() &&
|
||||
\ b:delimitMate_expand_space
|
||||
if delimitMate#WithinEmptyPair()
|
||||
" Expand:
|
||||
call insert(b:delimitMate_buffer, 's')
|
||||
return delimitMate#WriteAfter(' ') . "\<Space>"
|
||||
|
||||
Reference in new issue
Block a user