Skip merging nth offsets when unnecessary

This commit is contained in:
Junegunn Choi
2025-01-16 01:52:42 +09:00
parent 3e7f032ec2
commit 938c15ec63

View File

@@ -2722,7 +2722,7 @@ func (t *Terminal) printHighlighted(result Result, colBase tui.ColorPair, colMat
sort.Sort(ByOrder(charOffsets))
}
var nthOffsets []Offset
if len(t.nth) > 0 && postTask != nil {
if len(t.nthCurrent) > 0 && t.nthAttr > 0 && postTask != nil {
var tokens []Token
if item.transformed != nil {
tokens = item.transformed.tokens