Mercurial > vim
diff src/testdir/test_edit.vim @ 20285:bce10d039e06 v8.2.0698
patch 8.2.0698: insert mode completion not fully tested
Commit: https://github.com/vim/vim/commit/f9ab52e155dc13f59b654d754041fe78e17b9074
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue May 5 19:57:18 2020 +0200
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 https://github.com/vim/vim/issues/6041)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 05 May 2020 20:00:05 +0200 |
parents | 06a1dd50463e |
children | 045442aa392b |
line wrap: on
line diff
--- a/src/testdir/test_edit.vim +++ b/src/testdir/test_edit.vim @@ -328,8 +328,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) @@ -368,15 +368,15 @@ func Test_edit_12() call feedkeys("R\<c-t>\<c-t>", '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\<cr>\<cr>/", 'tnix') - call assert_equal(["\t/*", " *", " */"], getline(1, '$')) - set formatoptions& + setlocal autoindent backspace=2 + call setline(1, "\tone\t\ttwo") + exe "normal ggRred\<CR>six" .. repeat("\<BS>", 8) + call assert_equal(["\tone\t\ttwo"], getline(1, '$')) bw! endfunc