From 95b1191505a567fd309c16615948479456826c92 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 17 Jul 2022 11:57:42 +0800 Subject: vim-patch:8.2.0698: insert mode completion not fully tested Problem: Insert mode completion not fully tested. Solution: Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#6041) https://github.com/vim/vim/commit/f9ab52e155dc13f59b654d754041fe78e17b9074 Cherry-pick test_ins_complete.vim changes from patches 8.2.{0522,0615}. --- src/nvim/testdir/test_edit.vim | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/nvim/testdir/test_edit.vim') diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim index 69a34a1c51..42c77518e4 100644 --- a/src/nvim/testdir/test_edit.vim +++ b/src/nvim/testdir/test_edit.vim @@ -349,8 +349,8 @@ func Test_edit_11_indentexpr() bw! endfunc +" Test changing indent in replace mode func Test_edit_12() - " Test changing indent in replace mode new call setline(1, ["\tabc", "\tdef"]) call cursor(2, 4) @@ -389,15 +389,15 @@ func Test_edit_12() call feedkeys("R\\", 'tnix') call assert_equal(["\tabc", "\t\t\tdef"], getline(1, '$')) call assert_equal([0, 2, 2, 0], getpos('.')) - set et - set sw& et& + set sw& + + " In replace mode, after hitting enter in a line with tab characters, + " pressing backspace should restore the tab characters. %d - call setline(1, ["\t/*"]) - set formatoptions=croql - call cursor(1, 3) - call feedkeys("A\\/", 'tnix') - call assert_equal(["\t/*", " *", " */"], getline(1, '$')) - set formatoptions& + setlocal autoindent backspace=2 + call setline(1, "\tone\t\ttwo") + exe "normal ggRred\six" .. repeat("\", 8) + call assert_equal(["\tone\t\ttwo"], getline(1, '$')) bw! endfunc -- cgit