micro/pkg/highlight
Dmytro Maluka acb0d763df
ReHighlightStates: sanity-check startline value (#3237)
Check if startline value is valid before passing it to input.State(),
to prevent a theoretically possible race when the number of lines
changes in the meantime, causing an out of bounds access.

Actually this race cannot happen: ReHighlightStates() is only called
from the main goroutine, and the line array is modified, again, only by
the main goroutine. So for now this change is rather cosmetic: it is
just to make the highligher API implementation self-sufficiently safe
without assumptions about which goroutines are using which API functions
and how.
2024-04-09 00:31:01 +02:00
..
highlighter.go ReHighlightStates: sanity-check startline value (#3237) 2024-04-09 00:31:01 +02:00
parser.go Check for missing or empty filetype in syntax files 2024-03-28 01:22:25 +01:00
unicode.go Make determining whether a code point represents a combining mark faster (#1719) 2020-06-12 00:10:00 -04:00