diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-08-25 20:56:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-25 20:56:15 +0200 |
commit | 10d7d73b2dc6db081a8a1f405204d35cccb85196 (patch) | |
tree | 24e10654b176456dbe9e6225966869dce298f0da /test/functional/lua | |
parent | a373ca1d826b1386f1fa291de70ee5d6bb81ec9b (diff) | |
parent | 14231463a49d445d5cb889897b2f5cc4b99fbe06 (diff) | |
download | rneovim-10d7d73b2dc6db081a8a1f405204d35cccb85196.tar.gz rneovim-10d7d73b2dc6db081a8a1f405204d35cccb85196.tar.bz2 rneovim-10d7d73b2dc6db081a8a1f405204d35cccb85196.zip |
Merge pull request #15475 from vigoux/bufupdates-paste
Send correct byte updates on visual paste
Diffstat (limited to 'test/functional/lua')
-rw-r--r-- | test/functional/lua/buffer_updates_spec.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/lua/buffer_updates_spec.lua b/test/functional/lua/buffer_updates_spec.lua index a5b613f0b2..073927bf22 100644 --- a/test/functional/lua/buffer_updates_spec.lua +++ b/test/functional/lua/buffer_updates_spec.lua @@ -978,6 +978,22 @@ describe('lua: nvim_buf_attach on_bytes', function() } end) + it("visual paste", function() + local check_events= setup_eventcheck(verify, { "aaa {", "b", "}" }) + -- Setting up + feed[[jdd]] + check_events { + { "test1", "bytes", 1, 3, 1, 0, 6, 1, 0, 2, 0, 0, 0 }; + } + + -- Actually testing + feed[[v%p]] + check_events { + { "test1", "bytes", 1, 8, 0, 4, 4, 1, 1, 3, 0, 0, 0 }; + { "test1", "bytes", 1, 8, 0, 4, 4, 0, 0, 0, 2, 0, 3 }; + } + end) + it("nvim_buf_set_lines", function() local check_events = setup_eventcheck(verify, {"AAA", "BBB"}) |