Commit graph

2 commits

Author SHA1 Message Date
c97e22fedb
refactor: Use common function to initialize highlighter
This avoids differences between code, tests and benchmarks.
2023-04-21 20:56:29 +02:00
718a7fde41
feat: Improve performances
- create a map of byte offsets to Kakoune ranges once, to avoid having to
iterate the content for every highlight event
- create a direct lookup for faces from the token index passed by the
highlighter event, rather than performing a string map lookup each time
- minimize allocations by pushing only a single string with sufficient
capacity, rather than building small strings
2023-04-18 10:35:14 +02:00