Closed natecraddock closed 1 year ago
An even better solution would be to remove the concept of range highlighting altogether. Instead, highlight each individual byte/character/grapheme. This will actually simplify the implementation greatly.
This is also how fzf and fzy do highlighting
On the second line we would expect the source/b/e and the outlinerdraw highlights to overlap, highlighting
source/blender/freestyle/intern/scene_graph/Draw
, but only the first token is highlighted.So filtering works, but range highlighting needs a rework.
The current algorithm is messy and error prone. Because range highlighting occurs for a smaller number of candidates (n < 100 usually), we can do a bit more work.
Ideally, when highlighting the output array of ranges should be sorted and joined. So the ranges are in the correct order, and if needed, any overlaps are joined together.