diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-03-16 18:11:07 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-03-16 18:11:07 +0100 |
commit | 2ba4238818ca5ea52334de3037ef3729584cebf5 (patch) | |
tree | 53d53907ea3e134ab895b21ae61818e66e6f6b1c /src/testdir/test_edit.vim | |
parent | 713bf9e996d8c9a2cc5003ee0c95f12055756ae5 (diff) |
patch 8.1.1011: indent from autoindent not removed from blank linev8.1.1011
Problem: Indent from autoindent not removed from blank line. (Daniel Hahler)
Solution: Do not reset did_ai when text follows. (closes #4119)
Diffstat (limited to 'src/testdir/test_edit.vim')
-rw-r--r-- | src/testdir/test_edit.vim | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim index 9a60d018e1..b35497fc2a 100644 --- a/src/testdir/test_edit.vim +++ b/src/testdir/test_edit.vim @@ -399,8 +399,19 @@ func Test_edit_13() call feedkeys("A {\<cr>more\<cr>}\<esc>", 'tnix') call assert_equal(["\tabc {", "\t\tmore", "\t}"], getline(1, '$')) set smartindent& autoindent& - bw! + bwipe! endif + + " Test autoindent removing indent of blank line. + new + call setline(1, ' foo bar baz') + set autoindent + exe "normal 0eea\<CR>\<CR>\<Esc>" + call assert_equal(" foo bar", getline(1)) + call assert_equal("", getline(2)) + call assert_equal(" baz", getline(3)) + set autoindent& + bwipe! endfunc func Test_edit_CR() |