diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-02-09 14:21:04 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-02-09 14:21:04 +0800 |
commit | d9cb3fba9228aed5109a8e6069c50e4f265be9f3 (patch) | |
tree | 15a6eac7071397796be87916e907b0997b4b700b /test | |
parent | 07c97fa02d2f5be0e643f78428d56413895096cd (diff) | |
download | rneovim-d9cb3fba9228aed5109a8e6069c50e4f265be9f3.tar.gz rneovim-d9cb3fba9228aed5109a8e6069c50e4f265be9f3.tar.bz2 rneovim-d9cb3fba9228aed5109a8e6069c50e4f265be9f3.zip |
vim-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 vim/vim#9591)
https://github.com/vim/vim/commit/fb55207ed17918c8a2a6cadf5ad9d5fcf686a7ab
Cherry-pick get_y_previous() and set_y_previous() from patch 8.1.1736.
Nvim has removed y_current, so code related to it is N/A.
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/editor/put_spec.lua | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/functional/editor/put_spec.lua b/test/functional/editor/put_spec.lua index fdda2be131..c367f8fdd0 100644 --- a/test/functional/editor/put_spec.lua +++ b/test/functional/editor/put_spec.lua @@ -507,7 +507,9 @@ describe('put command', function() return function(exception_table, after_redo) test_expect(exception_table, after_redo) if selection_string then - eq(selection_string, getreg('"')) + if not conversion_table.put_backwards then + eq(selection_string, getreg('"')) + end else eq('test_string"', getreg('"')) end @@ -714,7 +716,9 @@ describe('put command', function() expect_base, conversion_table) return function(exception_table, after_redo) test_expect(exception_table, after_redo) - eq('Line of words 1\n', getreg('"')) + if not conversion_table.put_backwards then + eq('Line of words 1\n', getreg('"')) + end end end local base_expect_string = [[ @@ -748,7 +752,9 @@ describe('put command', function() end, expect_base, conversion_table) return function(e,c) test_expect(e,c) - eq('Lin\nLin', getreg('"')) + if not conversion_table.put_backwards then + eq('Lin\nLin', getreg('"')) + end end end |