Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
patch 8.0.1682: auto indenting breaks inserting a block
Problem: Auto indenting breaks inserting a block. Solution: Do not check for cursor movement if indent was changed. (Christian Brabandt, closes #2778)
- Loading branch information
Showing
with
31 additions
and 3 deletions.
- +1 −0 src/Makefile
- +7 −3 src/ops.c
- +1 −0 src/testdir/Make_all.mak
- +20 −0 src/testdir/test_blockedit.vim
- +2 −0 src/version.c
@@ -0,0 +1,20 @@ | ||
" Test for block inserting | ||
" | ||
" TODO: rewrite test39.in into this new style test | ||
|
||
func Test_blockinsert_indent() | ||
new | ||
filetype plugin indent on | ||
setlocal sw=2 et ft=vim | ||
call setline(1, ['let a=[', ' ''eins'',', ' ''zwei'',', ' ''drei'']']) | ||
call cursor(2, 3) | ||
exe "norm! \<c-v>2jI\\ \<esc>" | ||
call assert_equal(['let a=[', ' \ ''eins'',', ' \ ''zwei'',', ' \ ''drei'']'], | ||
\ getline(1,'$')) | ||
" reset to sane state | ||
filetype off | ||
bwipe! | ||
endfunc | ||
|
||
|
||
" vim: shiftwidth=2 sts=2 expandtab |