summaryrefslogtreecommitdiffstats
path: root/src/testdir
diff options
context:
space:
mode:
authorChristian Brabandt <cb@256bit.org>2024-01-05 18:19:52 +0100
committerChristian Brabandt <cb@256bit.org>2024-01-05 18:19:52 +0100
commit5d5cbb2b9ac526fb6fad2116e24a282affc45efe (patch)
tree0d024a5158fccea918982965c556016fa0024aab /src/testdir
parentb1ed7ec9f7d1a0142d4f1c8c83bab9172bc92c7c (diff)
patch 9.1.0015: i_CTRL-R- no longer works in replace modev9.1.0015
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: #13792 closes: #13816 Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_normal.vim2
-rw-r--r--src/testdir/test_registers.vim20
2 files changed, 21 insertions, 1 deletions
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim
index 90bedf1800..38ad8107b4 100644
--- a/src/testdir/test_normal.vim
+++ b/src/testdir/test_normal.vim
@@ -4181,4 +4181,4 @@ func Test_brace_single_line()
bw!
endfunc
-" vim: shiftwidth=2 sts=2 expandtab
+" vim: shiftwidth=2 sts=2 expandtab nofoldenable
diff --git a/src/testdir/test_registers.vim b/src/testdir/test_registers.vim
index f85e72735a..50f39107b4 100644
--- a/src/testdir/test_registers.vim
+++ b/src/testdir/test_registers.vim
@@ -946,4 +946,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