aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_edit.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-17 14:15:32 +0800
committerGitHub <noreply@github.com>2022-07-17 14:15:32 +0800
commit9e7f92e59a7fbbc0e266700db1f25278eb30cb2a (patch)
treee378e7e6d6ba2e4678d92b28c2a67f4930e5a607 /src/nvim/testdir/test_edit.vim
parent53c398d8f44f1796c216402c953512eb57733529 (diff)
parent006334f3a7014d5d23df617ed619377464d4956f (diff)
downloadrneovim-9e7f92e59a7fbbc0e266700db1f25278eb30cb2a.tar.gz
rneovim-9e7f92e59a7fbbc0e266700db1f25278eb30cb2a.tar.bz2
rneovim-9e7f92e59a7fbbc0e266700db1f25278eb30cb2a.zip
Merge pull request #19404 from zeertzjq/vim-8.2.0670
vim-patch:8.2.{0670,0698,1294,1984,2424,2426,2427,5029}: textlock patches
Diffstat (limited to 'src/nvim/testdir/test_edit.vim')
-rw-r--r--src/nvim/testdir/test_edit.vim18
1 files changed, 9 insertions, 9 deletions
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\<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