vim-patch:8.1.0999: use register one too often and not properly tested

Problem:    Use register one too often and not properly tested.
Solution:   Do not always use register one when specifying a register.
            (closes vim/vim#4085)  Add more tests.
9d7fdd403a
This commit is contained in:
zeertzjq
2022-02-23 11:12:30 +08:00
parent f6d507f5ba
commit 5ac30eacf4
3 changed files with 98 additions and 13 deletions

View File

@@ -50,29 +50,33 @@ local function basic_register_test(noblock)
text, stuff and some more
some some text, stuff and some more]])
-- deleting a word to named ("a) updates "1 (and not "-)
-- deleting a word to named ("a) doesn't update "1 or "-
feed('gg"adwj"1P^"-P')
expect([[
, stuff and some more
some textsome some text, stuff and some more]])
some some random text
some some text, stuff and some more]])
-- deleting a line does update ""
feed('ggdd""P')
expect([[
, stuff and some more
some textsome some text, stuff and some more]])
some some random text
some some text, stuff and some more]])
feed('ggw<c-v>jwyggP')
if noblock then
expect([[
stuf
me t
me s
, stuff and some more
some textsome some text, stuff and some more]])
some some random text
some some text, stuff and some more]])
else
expect([[
stuf, stuff and some more
me tsome textsome some text, stuff and some more]])
me ssome some random text
some some text, stuff and some more]])
end
-- pasting in visual does unnamed delete of visual selection