annotate src/testdir/test_blockedit.vim @ 13620:4faf77b96432 v8.0.1682

patch 8.0.1682: auto indenting breaks inserting a block commit https://github.com/vim/vim/commit/8c87a2b1fec85e4aac33f71586ac1514536fc66b Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 10 13:15:47 2018 +0200 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)
author Christian Brabandt <cb@256bit.org>
date Tue, 10 Apr 2018 13:30:07 +0200
parents
children 7ed76dcf0d94
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13620
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Test for block inserting
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 "
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 " TODO: rewrite test39.in into this new style test
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 func Test_blockinsert_indent()
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 new
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 filetype plugin indent on
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 setlocal sw=2 et ft=vim
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 call setline(1, ['let a=[', ' ''eins'',', ' ''zwei'',', ' ''drei'']'])
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 call cursor(2, 3)
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 exe "norm! \<c-v>2jI\\ \<esc>"
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 call assert_equal(['let a=[', ' \ ''eins'',', ' \ ''zwei'',', ' \ ''drei'']'],
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 \ getline(1,'$'))
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 " reset to sane state
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 filetype off
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 bwipe!
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 endfunc
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19
4faf77b96432 patch 8.0.1682: auto indenting breaks inserting a block
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 " vim: shiftwidth=2 sts=2 expandtab