aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/buffer_updates_spec.lua
diff options
context:
space:
mode:
authorchentau <tchen1998@gmail.com>2021-03-22 19:44:21 -0700
committerchentau <tchen1998@gmail.com>2021-03-23 14:06:57 -0700
commit7fbabbaa576cd3e1de303d6040b1c8444d5708a7 (patch)
treef2b3637706bdd4476bb913679b2e06f4243ba491 /test/functional/lua/buffer_updates_spec.lua
parentd41778c993e95c8b37b3d8e10dacc3060ae489da (diff)
downloadrneovim-7fbabbaa576cd3e1de303d6040b1c8444d5708a7.tar.gz
rneovim-7fbabbaa576cd3e1de303d6040b1c8444d5708a7.tar.bz2
rneovim-7fbabbaa576cd3e1de303d6040b1c8444d5708a7.zip
Extmarks: correct buffer events on blockwise paste
Diffstat (limited to 'test/functional/lua/buffer_updates_spec.lua')
-rw-r--r--test/functional/lua/buffer_updates_spec.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/lua/buffer_updates_spec.lua b/test/functional/lua/buffer_updates_spec.lua
index 7a6b5be8bc..ad686e0386 100644
--- a/test/functional/lua/buffer_updates_spec.lua
+++ b/test/functional/lua/buffer_updates_spec.lua
@@ -717,6 +717,26 @@ describe('lua: nvim_buf_attach on_bytes', function()
command("bw!")
end)
+ it("blockwise paste with uneven line lengths", function()
+ local check_events = setup_eventcheck(verify, {'aaaa', 'aaa', 'aaa'})
+
+ -- eq({}, meths.buf_get_lines(0, 0, -1, true))
+ feed("gg0<c-v>jj$d")
+
+ check_events {
+ { "test1", "bytes", 1, 3, 0, 0, 0, 0, 4, 4, 0, 0, 0 },
+ { "test1", "bytes", 1, 3, 1, 0, 1, 0, 3, 3, 0, 0, 0 },
+ { "test1", "bytes", 1, 3, 2, 0, 2, 0, 3, 3, 0, 0, 0 },
+ }
+
+ feed("p")
+ check_events {
+ { "test1", "bytes", 1, 4, 0, 0, 0, 0, 0, 0, 0, 4, 4 },
+ { "test1", "bytes", 1, 4, 1, 0, 5, 0, 0, 0, 0, 3, 3 },
+ { "test1", "bytes", 1, 4, 2, 0, 9, 0, 0, 0, 0, 3, 3 },
+ }
+
+ end)
teardown(function()
os.remove "Xtest-reload"