Skip to content

Commit

Permalink
Merge pull request #80 from reeflective/dev
Browse files Browse the repository at this point in the history
dev
  • Loading branch information
maxlandon authored Feb 11, 2025
2 parents 80706ed + d6741a2 commit 45ba7a7
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions internal/display/highlight.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func (e *Engine) hlReset(regions []core.Selection, line []rune, pos int) ([]core
for i, reg := range regions {
_, epos := reg.Pos()
foreground, background := reg.Highlights()
matcher := reg.Type == "matcher"
// matcher := reg.Type == "matcher"

if epos != pos {
continue
Expand All @@ -208,14 +208,18 @@ func (e *Engine) hlReset(regions []core.Selection, line []rune, pos int) ([]core
}

if background != "" {
background, _ := strconv.Unquote(e.opts.GetString("active-region-end-color"))
foreground := e.opts.GetString("active-region-start-color")

if background == "" && foreground == "" && !matcher {
line = append(line, []rune(color.ReverseReset)...)
} else {
line = append(line, []rune(color.BgDefault)...)
}
// background, _ := strconv.Unquote(e.opts.GetString("active-region-end-color"))
// foreground := e.opts.GetString("active-region-start-color")
line = append(line, []rune(color.ReverseReset)...)
line = append(line, []rune(color.BgDefault)...)
// if background == "" && foreground == "" && !matcher {
// line = append(line, []rune(color.ReverseReset)...)
// } else {
//
// line = append(line, []rune(color.BgDefault)...)
// }
//
// line = append(line, []rune(color.ReverseReset)...)
}
}

Expand Down

0 comments on commit 45ba7a7

Please sign in to comment.