diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-08-31 11:18:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-31 11:18:35 +0200 |
commit | 25e0a449bb6619fc534fa862c2f591657be1e1d5 (patch) | |
tree | bf3d8beff647c8e1e5b39c746088843d629338ef /test/functional/api/vim_spec.lua | |
parent | 8a03acb8dad4abaf507d502b11a66bd5a2b5e51e (diff) | |
parent | 2c605d1f22a243bc34b680f69c7c8cfe01b80887 (diff) | |
download | rneovim-25e0a449bb6619fc534fa862c2f591657be1e1d5.tar.gz rneovim-25e0a449bb6619fc534fa862c2f591657be1e1d5.tar.bz2 rneovim-25e0a449bb6619fc534fa862c2f591657be1e1d5.zip |
Merge pull request #10878 from bfredl/pastedefer
TUI: defer nvim_paste event properly
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r-- | test/functional/api/vim_spec.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index 6f7661dd76..02e83c4d58 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -518,6 +518,35 @@ describe('API', function() line 3]]) eq({0,3,6,0}, funcs.getpos('.')) end) + + it('allows block width', function() + -- behave consistently with setreg(); support "\022{NUM}" return by getregtype() + meths.put({'line 1','line 2','line 3'}, 'l', false, false) + expect([[ + line 1 + line 2 + line 3 + ]]) + + -- larger width create spaces + meths.put({'a', 'bc'}, 'b3', false, false) + expect([[ + a line 1 + bc line 2 + line 3 + ]]) + -- smaller width is ignored + meths.put({'xxx', 'yyy'}, '\0221', false, true) + expect([[ + xxxa line 1 + yyybc line 2 + line 3 + ]]) + eq({false, "Invalid type: 'bx'"}, + meth_pcall(meths.put, {'xxx', 'yyy'}, 'bx', false, true)) + eq({false, "Invalid type: 'b3x'"}, + meth_pcall(meths.put, {'xxx', 'yyy'}, 'b3x', false, true)) + end) end) describe('nvim_strwidth', function() |