From 14231463a49d445d5cb889897b2f5cc4b99fbe06 Mon Sep 17 00:00:00 2001 From: Thomas Vigouroux Date: Tue, 24 Aug 2021 17:57:57 +0200 Subject: fix(bufupdates): send correct updates for visual paste MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One step further towards stable tree-sitter. Co-authored-by: Björn Linse --- test/functional/lua/buffer_updates_spec.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test') 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"}) -- cgit