0
0
mirror of https://github.com/vim/vim.git synced 2025-10-14 07:04:10 -04:00

patch 8.2.4242: put in Visual mode cannot be repeated

Problem:    Put in Visual mode cannot be repeated.
Solution:   Use "P" to put without yanking the deleted text into the unnamed
            register. (Shougo Matsushita, closes #9591)
This commit is contained in:
Shougo Matsushita
2022-01-28 16:01:13 +00:00
committed by Bram Moolenaar
parent 420fabcd4f
commit fb55207ed1
5 changed files with 43 additions and 10 deletions

View File

@@ -1358,8 +1358,32 @@ func Test_visual_undo_deletes_last_line()
exe "normal ggvjfxO"
undo
normal gNU
bwipe!
endfunc
func Test_visual_paste()
new
" v_p overwrites unnamed register.
call setline(1, ['xxxx'])
call setreg('"', 'foo')
call setreg('-', 'bar')
normal 1Gvp
call assert_equal(@", 'x')
call assert_equal(@-, 'x')
if has('clipboard')
" v_P does not overwrite unnamed register.
call setline(1, ['xxxx'])
call setreg('"', 'foo')
call setreg('-', 'bar')
normal 1GvP
call assert_equal(@", 'foo')
call assert_equal(@-, 'x')
endif
bwipe!
endfunc
" vim: shiftwidth=2 sts=2 expandtab