diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-03-24 00:27:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-24 00:27:55 +0100 |
commit | 1186f7dd96b054d6a653685089fc845a8f5d2f27 (patch) | |
tree | 11b475bb721cc6ea74552c7d71bb3d614cee022b /test/functional/lua/buffer_updates_spec.lua | |
parent | 9f5c8226bba43b6c9ae253e6b94b41d9d140a626 (diff) | |
parent | 7fbabbaa576cd3e1de303d6040b1c8444d5708a7 (diff) | |
download | rneovim-1186f7dd96b054d6a653685089fc845a8f5d2f27.tar.gz rneovim-1186f7dd96b054d6a653685089fc845a8f5d2f27.tar.bz2 rneovim-1186f7dd96b054d6a653685089fc845a8f5d2f27.zip |
Merge pull request #14191 from chentau/extmark_blockpaste
Extmarks: send correct buffer events on blockwise paste for nonuniform lines
Diffstat (limited to 'test/functional/lua/buffer_updates_spec.lua')
-rw-r--r-- | test/functional/lua/buffer_updates_spec.lua | 20 |
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 8a25f4dc2d..6d7d9b4d8b 100644 --- a/test/functional/lua/buffer_updates_spec.lua +++ b/test/functional/lua/buffer_updates_spec.lua @@ -781,6 +781,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" |