mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00

Problem: When iterating in reverse with {start} > {end} in `nvim_buf_get_extmarks()`, marks that overlap {start} and are greater than {end} are included in the return value twice. Marks that overlap {end} and do not overlap {start} are not not included in the return value at all. Marks are not actually returned in a meaningful "traversal order". Solution: Rather than actually iterating in reverse, (also possible but requires convoluted conditions and would require fetching overlapping marks for both the {start} and {end} position, while still ending up with non-traversal ordered marks), iterate normally and reverse the return value.