mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2025-01-23 15:18:29 +00:00
parent
62a916bc24
commit
2a8b65e105
@ -138,9 +138,11 @@ func (result *Result) colorOffsets(matchOffsets []Offset, theme *tui.ColorTheme,
|
|||||||
for i := off[0]; i < off[1]; i++ {
|
for i := off[0]; i < off[1]; i++ {
|
||||||
// Negative of 1-based index of itemColors
|
// Negative of 1-based index of itemColors
|
||||||
// - The extra -1 means highlighted
|
// - The extra -1 means highlighted
|
||||||
|
if cols[i] >= 0 {
|
||||||
cols[i] = cols[i]*-1 - 1
|
cols[i] = cols[i]*-1 - 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// sort.Sort(ByOrder(offsets))
|
// sort.Sort(ByOrder(offsets))
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ func TestColorOffset(t *testing.T) {
|
|||||||
// ++++++++ ++++++++++
|
// ++++++++ ++++++++++
|
||||||
// --++++++++-- --++++++++++---
|
// --++++++++-- --++++++++++---
|
||||||
|
|
||||||
offsets := []Offset{{5, 15}, {25, 35}}
|
offsets := []Offset{{5, 15}, {10, 12}, {25, 35}}
|
||||||
item := Result{
|
item := Result{
|
||||||
item: &Item{
|
item: &Item{
|
||||||
colors: &[]ansiOffset{
|
colors: &[]ansiOffset{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user