Insert new item at the right level on <S-CR>

This commit is contained in:
EinfachToll 2013-10-29 13:03:10 +01:00
parent eb44af27c2
commit 0be8924759

View File

@ -1256,13 +1256,11 @@ function! s:cr_on_empty_list_item(lnum, behavior) "{{{
endfunction "}}}
function! s:cr_on_empty_line(lnum, behavior) "{{{
if a:behavior == 2 || a:behavior == 3
normal! gi 
call s:create_marker(a:lnum+1)
elseif a:behavior == 1 || a:behavior == 4
"inserting and deleting the x is necessary
"because otherwise the indent is lost
normal! gi x
if a:behavior == 2 || a:behavior == 3
call s:create_marker(a:lnum+1)
endif
endfunction "}}}