aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-01-06 07:01:08 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-01-13 08:29:47 +0800
commit2783b6b0a48389f5e12109d9894269768c3e9fe5 (patch)
tree3c2fbe68241ac44176ccae1be5d8db23c08447c1 /test
parent4142b8cd2c86fab27d041373dde78a1bc4fa9895 (diff)
downloadrneovim-2783b6b0a48389f5e12109d9894269768c3e9fe5.tar.gz
rneovim-2783b6b0a48389f5e12109d9894269768c3e9fe5.tar.bz2
rneovim-2783b6b0a48389f5e12109d9894269768c3e9fe5.zip
vim-patch:9.1.0015: i_CTRL-R- no longer works in replace mode
Problem: i_CTRL-R- no longer works in replace mode Solution: delete characters in replace mode before putting, add a test, add a bit warning into the documentation, that i_CTRL-R-P/O is not supported in Replace mode for now fixes: vim/vim#13792 closes: vim/vim#13816 https://github.com/vim/vim/commit/5d5cbb2b9ac526fb6fad2116e24a282affc45efe Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_normal.vim2
-rw-r--r--test/old/testdir/test_registers.vim20
2 files changed, 21 insertions, 1 deletions
diff --git a/test/old/testdir/test_normal.vim b/test/old/testdir/test_normal.vim
index 1c49c0b446..c72d83fa52 100644
--- a/test/old/testdir/test_normal.vim
+++ b/test/old/testdir/test_normal.vim
@@ -4186,4 +4186,4 @@ func Test_brace_single_line()
bw!
endfunc
-" vim: shiftwidth=2 sts=2 expandtab
+" vim: shiftwidth=2 sts=2 expandtab nofoldenable
diff --git a/test/old/testdir/test_registers.vim b/test/old/testdir/test_registers.vim
index 64dcc687ce..7cc5ebbe6f 100644
--- a/test/old/testdir/test_registers.vim
+++ b/test/old/testdir/test_registers.vim
@@ -890,4 +890,24 @@ func Test_register_y_append_reset()
bwipe!
endfunc
+func Test_insert_small_delete_replace_mode()
+ new
+ call setline(1, ['foo', 'bar', 'foobar', 'bar'])
+ let @-='foo'
+ call cursor(2, 1)
+ exe ":norm! R\<C-R>-\<C-R>-"
+ call assert_equal('foofoo', getline(2))
+ call cursor(3, 1)
+ norm! D
+ call assert_equal(['foo', 'foofoo', '', 'bar'], getline(1, 4))
+ call cursor(4, 2)
+ exe ":norm! R\<C-R>-ZZZZ"
+ call assert_equal(['foo', 'foofoo', '', 'bfoobarZZZZ'], getline(1, 4))
+ call cursor(1, 1)
+ let @-=''
+ exe ":norm! R\<C-R>-ZZZ"
+ call assert_equal(['ZZZ', 'foofoo', '', 'bfoobarZZZZ'], getline(1, 4))
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab