summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_blockedit.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-11-27 13:28:24 +0000
committerBram Moolenaar <Bram@vim.org>2021-11-27 13:28:24 +0000
commite9b0b40b7978f683977922233b42dd439ef31920 (patch)
treeb0ed3c67047ff8cc107bbcde0fc8e1445733481b /src/testdir/test_blockedit.vim
parent279d733dfb838cbabe88c8b8d3549d1493a49bbe (diff)
patch 8.2.3684: blockwise insert does not handle autoindent properlyv8.2.3684
Problem: Blockwise insert does not handle autoindent properly. Solution: Adjust text column for indent. (closes #9229)
Diffstat (limited to 'src/testdir/test_blockedit.vim')
-rw-r--r--src/testdir/test_blockedit.vim27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/testdir/test_blockedit.vim b/src/testdir/test_blockedit.vim
index 29e24759fa..216238a528 100644
--- a/src/testdir/test_blockedit.vim
+++ b/src/testdir/test_blockedit.vim
@@ -14,6 +14,33 @@ func Test_blockinsert_indent()
bwipe!
endfunc
+func Test_blockinsert_autoindent()
+ new
+ let lines =<< trim END
+ var d = {
+ a: () => 0,
+ b: () => 0,
+ c: () => 0,
+ }
+ END
+ call setline(1, lines)
+ filetype plugin indent on
+ setlocal sw=2 et ft=vim
+ setlocal indentkeys+=:
+ exe "norm! 2Gf)\<c-v>2jA: asdf\<esc>"
+ let expected =<< trim END
+ var d = {
+ a: (): asdf => 0,
+ b: (): asdf => 0,
+ c: (): asdf => 0,
+ }
+ END
+ call assert_equal(expected, getline(1, 5))
+
+ filetype off
+ bwipe!
+endfunc
+
func Test_blockinsert_delete()
new
let _bs = &bs