aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/buffer_updates_spec.lua
diff options
context:
space:
mode:
authorThomas Vigouroux <tomvig38@gmail.com>2020-09-30 15:16:20 +0200
committerKillTheMule <KillTheMule@users.noreply.github.com>2020-09-30 20:10:06 +0200
commitc1a740ae339c0d4de79ad5b82d540a671bd90505 (patch)
tree5311a0e6abff962baefe590ee7d1f30e6cae2f0e /test/functional/lua/buffer_updates_spec.lua
parentba515622fb84e6c570e12743630e75acf5f83839 (diff)
downloadrneovim-c1a740ae339c0d4de79ad5b82d540a671bd90505.tar.gz
rneovim-c1a740ae339c0d4de79ad5b82d540a671bd90505.tar.bz2
rneovim-c1a740ae339c0d4de79ad5b82d540a671bd90505.zip
bytetrack: add blockwise paste test
Diffstat (limited to 'test/functional/lua/buffer_updates_spec.lua')
-rw-r--r--test/functional/lua/buffer_updates_spec.lua30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/functional/lua/buffer_updates_spec.lua b/test/functional/lua/buffer_updates_spec.lua
index ac3048aafd..2a1ad210c1 100644
--- a/test/functional/lua/buffer_updates_spec.lua
+++ b/test/functional/lua/buffer_updates_spec.lua
@@ -477,6 +477,36 @@ describe('lua: nvim_buf_attach on_bytes', function()
{ "test1", "bytes", 1, 5, 0, 0, 0, 0, 0, 0, 0, 3, 3 };
}
end)
+
+ it('blockwise paste', function()
+ local check_events = setup_eventcheck(verify, {'1', '2', '3'})
+ feed('1G0')
+ feed('y<C-v>2j')
+ feed('G0')
+ feed('p')
+ check_events {
+ { "test1", "bytes", 1, 3, 2, 1, 5, 0, 0, 0, 0, 1, 1 };
+ { "test1", "bytes", 1, 3, 3, 0, 7, 0, 0, 0, 0, 2, 2 };
+ { "test1", "bytes", 1, 3, 4, 0, 10, 0, 0, 0, 0, 2, 2 };
+ }
+
+ feed('2G0')
+ feed('p')
+ check_events {
+ { "test1", "bytes", 1, 4, 1, 1, 3, 0, 0, 0, 0, 1, 1 };
+ { "test1", "bytes", 1, 4, 2, 1, 6, 0, 0, 0, 0, 1, 1 };
+ { "test1", "bytes", 1, 4, 3, 1, 10, 0, 0, 0, 0, 1, 1 };
+ }
+
+ feed('1G0')
+ feed('P')
+ check_events {
+ { "test1", "bytes", 1, 5, 0, 0, 0, 0, 0, 0, 0, 1, 1 };
+ { "test1", "bytes", 1, 5, 1, 0, 3, 0, 0, 0, 0, 1, 1 };
+ { "test1", "bytes", 1, 5, 2, 0, 7, 0, 0, 0, 0, 1, 1 };
+ }
+
+ end)
end
describe('(with verify) handles', function()