summaryrefslogtreecommitdiffstats
path: root/src/result.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/result.go')
-rw-r--r--src/result.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/result.go b/src/result.go
index d72de420..b0428294 100644
--- a/src/result.go
+++ b/src/result.go
@@ -138,7 +138,9 @@ func (result *Result) colorOffsets(matchOffsets []Offset, theme *tui.ColorTheme,
for i := off[0]; i < off[1]; i++ {
// Negative of 1-based index of itemColors
// - The extra -1 means highlighted
- cols[i] = cols[i]*-1 - 1
+ if cols[i] >= 0 {
+ cols[i] = cols[i]*-1 - 1
+ }
}
}