mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-11-16 13:08:25 +00:00
score_item tried every combination of positions of the needle chars in the item, which is exponential in the length of the query. Typing the full name of a theme like "Solarized Dark Higher Contrast" in the themes kitten froze it for about half a minute. Instead find the best score for each position of each needle char from the best scores for the previous char. The per char scores are added in the same order as before, so the scores are bit for bit identical. When several sets of positions have exactly the same score, the highlighted positions can be different from before. |
||
|---|---|---|
| .. | ||
| score.go | ||
| score_test.go | ||