diff options
Diffstat (limited to 'test/functional/clipboard/clipboard_provider_spec.lua')
-rw-r--r-- | test/functional/clipboard/clipboard_provider_spec.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/clipboard/clipboard_provider_spec.lua b/test/functional/clipboard/clipboard_provider_spec.lua index c5d8f57008..52fdfaa8f4 100644 --- a/test/functional/clipboard/clipboard_provider_spec.lua +++ b/test/functional/clipboard/clipboard_provider_spec.lua @@ -73,6 +73,12 @@ local function basic_register_test(noblock) stuf, stuff and some more me tsome textsome some text, stuff and some more]]) end + + -- pasting in visual does unnamed delete of visual selection + feed('ggdG') + insert("one and two and three") + feed('"ayiwbbviw"ap^viwp$viw"-p') + expect("two and three and one") end describe('the unnamed register', function() @@ -241,6 +247,14 @@ describe('clipboard usage', function() eq('\02210', eval('getregtype()')) end) + it('yanks visual selection when pasting', function() + insert("indeed visual") + execute("let g:test_clip['*'] = [['clipboard'], 'c']") + feed("viwp") + eq({{'visual'}, 'v'}, eval("g:test_clip['*']")) + expect("indeed clipboard") + end) + end) it('supports :put', function() |