Merge pull request #14385 from chentau/extmark_delete

Extmarks: remove `curbuf->deleted_bytes2` from `op_delete`
This commit is contained in:
Björn Linse
2021-04-17 09:25:44 +02:00
committed by GitHub
2 changed files with 37 additions and 1 deletions

View File

@@ -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)