aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/buffer_updates_spec.lua
diff options
context:
space:
mode:
authorchentau <tchen1998@gmail.com>2021-04-15 16:30:34 -0700
committerchentau <tchen1998@gmail.com>2021-04-16 23:42:53 -0700
commite32eaf6538ecb5451ca513e1ec33d91ed2b2575b (patch)
tree50f9f0819d99b81830c59b23ed78e5bb1001c0de /test/functional/lua/buffer_updates_spec.lua
parentd9c7adc64c291f1a368c1417354332f72bdb66d6 (diff)
downloadrneovim-e32eaf6538ecb5451ca513e1ec33d91ed2b2575b.tar.gz
rneovim-e32eaf6538ecb5451ca513e1ec33d91ed2b2575b.tar.bz2
rneovim-e32eaf6538ecb5451ca513e1ec33d91ed2b2575b.zip
extmarks: remove curbuf->deleted_bytes2 from op_delete
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 3cb14ca93f..b94abd3a12 100644
--- a/test/functional/lua/buffer_updates_spec.lua
+++ b/test/functional/lua/buffer_updates_spec.lua
@@ -461,6 +461,36 @@ describe('lua: nvim_buf_attach on_bytes', function()
}
end)
+ it("deleting lines", function()
+ local check_events = setup_eventcheck(verify, origlines)
+
+ feed("dd")
+
+ check_events {
+ { "test1", "bytes", 1, 3, 0, 0, 0, 1, 0, 16, 0, 0, 0 };
+ }
+
+ feed("d2j")
+
+ check_events {
+ { "test1", "bytes", 1, 4, 0, 0, 0, 3, 0, 48, 0, 0, 0 };
+ }
+
+ feed("ld<c-v>2j")
+
+ check_events {
+ { "test1", "bytes", 1, 5, 0, 1, 1, 0, 1, 1, 0, 0, 0 };
+ { "test1", "bytes", 1, 5, 1, 1, 16, 0, 1, 1, 0, 0, 0 };
+ { "test1", "bytes", 1, 5, 2, 1, 31, 0, 1, 1, 0, 0, 0 };
+ }
+
+ feed("vjwd")
+
+ check_events {
+ { "test1", "bytes", 1, 10, 0, 1, 1, 1, 9, 23, 0, 0, 0 };
+ }
+ end)
+
it("changing lines", function()
local check_events = setup_eventcheck(verify, origlines)