m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 23:33:39 -05:00

Fix highlighting of regions that are matched multiple times

Fix #3596
This commit is contained in:
Junegunn Choi
2024-01-23 12:17:40 +09:00
parent 62a916bc24
commit 2a8b65e105
2 changed files with 4 additions and 2 deletions

View File

@@ -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
}
}
}