From 32998731bf19df219b8d3140943cfffe643573a5 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 16 Mar 2019 19:46:15 -0400 Subject: vim-patch:8.1.1011: indent from autoindent not removed #9742 Problem: Indent from autoindent not removed from blank line. (Daniel Hahler) Solution: Do not reset did_ai when text follows. (closes vim/vim#4119) https://github.com/vim/vim/commit/2ba4238818ca5ea52334de3037ef3729584cebf5 --- src/nvim/testdir/test_edit.vim | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim index f8946c6929..fa7cfaa40c 100644 --- a/src/nvim/testdir/test_edit.vim +++ b/src/nvim/testdir/test_edit.vim @@ -402,8 +402,19 @@ func! Test_edit_13() call feedkeys("A {\more\}\", '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\\\" + 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() -- cgit