fix(buffer_updates): handle :sort of already sorted buffer

This commit is contained in:
Björn Linse
2021-10-08 16:13:53 +02:00
parent 93d33ed02e
commit ef687d3218
2 changed files with 20 additions and 4 deletions

View File

@@ -1088,6 +1088,22 @@ describe('lua: nvim_buf_attach on_bytes', function()
}
end)
it(":sort lines", function()
local check_events = setup_eventcheck(verify, {"CCC", "BBB", "AAA"})
command "%sort"
check_events {
{ "test1", "bytes", 1, 3, 0, 0, 0, 3, 0, 12, 3, 0, 12 };
}
end)
it("handles already sorted lines", function()
local check_events = setup_eventcheck(verify, {"AAA", "BBB", "CCC"})
command "%sort"
check_events { }
end)
local function test_lockmarks(mode)
local description = (mode ~= "") and mode or "(baseline)"
it("test_lockmarks " .. description .. " %delete _", function()