mirror of
https://github.com/Hopiu/micro.git
synced 2026-04-05 07:21:00 +00:00
Slight improvements to included region highlighting
This commit is contained in:
parent
342f3c223d
commit
a517ea45bd
1 changed files with 6 additions and 6 deletions
|
|
@ -183,9 +183,9 @@ func (h *Highlighter) highlightRegion(highlights LineMatch, start int, canMatchE
|
|||
}
|
||||
for i, h := range fullHighlights {
|
||||
if i == 0 || h != fullHighlights[i-1] {
|
||||
if _, ok := highlights[start+i]; !ok {
|
||||
highlights[start+i] = h
|
||||
}
|
||||
// if _, ok := highlights[start+i]; !ok {
|
||||
highlights[start+i] = h
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -243,9 +243,9 @@ func (h *Highlighter) highlightEmptyRegion(highlights LineMatch, start int, canM
|
|||
}
|
||||
for i, h := range fullHighlights {
|
||||
if i == 0 || h != fullHighlights[i-1] {
|
||||
if _, ok := highlights[start+i]; !ok {
|
||||
highlights[start+i] = h
|
||||
}
|
||||
// if _, ok := highlights[start+i]; !ok {
|
||||
highlights[start+i] = h
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue