mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
Merge pull request #27147 from bfredl/crash2
fix(extmark): another "step out" case
This commit is contained in:
commit
d9946006c9
@ -1419,7 +1419,7 @@ bool marktree_itr_get_ext(MarkTree *b, MTPos p, MarkTreeIter *itr, bool last, bo
|
||||
return marktree_itr_prev(b, itr);
|
||||
} else if (itr->i >= itr->x->n) {
|
||||
// no need for "meta_filter" here, this just goes up one step
|
||||
return marktree_itr_next(b, itr);
|
||||
return marktree_itr_next_skip(b, itr, true, false, NULL, NULL);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -602,6 +602,13 @@ describe('marktree', function()
|
||||
until not lib.marktree_itr_next_filter(tree, iter, 101, 0, filter)
|
||||
eq(tablelength(seen), tablelength(shadow))
|
||||
|
||||
-- test skipping subtrees to find the filtered mark at line 50
|
||||
for i = 4, 50 do
|
||||
ok(lib.marktree_itr_get_filter(tree, i, 0, 60, 0, filter, iter))
|
||||
local mark = lib.marktree_itr_current(iter)
|
||||
eq({ 50, 50, 1 }, { mark.id, mark.pos.row, mark.pos.col })
|
||||
end
|
||||
|
||||
-- delete
|
||||
for id = 1, 10000, 2 do
|
||||
lib.marktree_lookup_ns(tree, ns, id, false, iter)
|
||||
|
Loading…
Reference in New Issue
Block a user