diff options
author | JD <46619169+rudiejd@users.noreply.github.com> | 2023-12-27 20:57:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-28 09:57:13 +0800 |
commit | 46ceefb52be6b014dd27b6adfbca3e1c9dff0c0c (patch) | |
tree | 34b795e7059f4e9eb08f8b0012e593189259b738 /test/functional | |
parent | e0d998dbc8b8e7047e1cc2bb520aea4d0b34f726 (diff) | |
download | rneovim-46ceefb52be6b014dd27b6adfbca3e1c9dff0c0c.tar.gz rneovim-46ceefb52be6b014dd27b6adfbca3e1c9dff0c0c.tar.bz2 rneovim-46ceefb52be6b014dd27b6adfbca3e1c9dff0c0c.zip |
fix(clipboard): make getreg() accurate for clipboard registers (#26740)
Problem: getreg("*") / getreg("+") disagree with :registers.
Solution: Avoid falling back to unnamed register if provider fails.
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/provider/clipboard_spec.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/provider/clipboard_spec.lua b/test/functional/provider/clipboard_spec.lua index 3c2e358745..004ee6d106 100644 --- a/test/functional/provider/clipboard_spec.lua +++ b/test/functional/provider/clipboard_spec.lua @@ -752,4 +752,11 @@ describe('clipboard (with fake clipboard.vim)', function() expect('some some') eq('some', eval('getreg("*")')) end) + + it('does not fall back to unnamed register with getreg() #24257', function () + eval('setreg("", "wrong")') + command('let g:cliperror = 1') + eq('', eval('getreg("*")')) + eq('', eval('getreg("+")')) + end) end) |