buffer_updates: autoload episode III: revenge of the trees

This commit is contained in:
Björn Linse
2021-02-14 11:10:36 +01:00
parent 5ad32885d4
commit c7a65fe6a1
3 changed files with 37 additions and 5 deletions

View File

@@ -635,6 +635,27 @@ describe('lua: nvim_buf_attach on_bytes', function()
}
eq({'new line 1 new line 2', 'new line 3'}, meths.buf_get_lines(0, 0, -1, true))
-- check we can undo and redo a reload event.
feed 'u'
check_events {
{ "test1", "bytes", 1, 8, 0, 10, 10, 0, 1, 1, 1, 0, 1 };
}
feed 'u'
check_events {
{ "test1", "reload", 1 };
}
feed '<c-r>'
check_events {
{ "test1", "reload", 1 };
}
feed '<c-r>'
check_events {
{ "test1", "bytes", 1, 14, 0, 10, 10, 1, 0, 1, 0, 1, 1 };
}
end)
teardown(function()