mirror of
https://github.com/charmbracelet/gum
synced 2024-06-01 21:32:15 +02:00
added semi working highlight for reverser search
This commit is contained in:
parent
0d932a8efa
commit
e804267b1e
|
@ -122,7 +122,7 @@ func (s *search) PrevMatch(m *model) {
|
|||
}
|
||||
|
||||
// Highliht the current match.
|
||||
//m.content = m.content[:i - len(nextMatch) -1] + m.matchHighlightStyle.Render(nextMatch) + m.content[i + len(nextMatch) -1:]
|
||||
m.content = m.content[:i] + strings.Replace(m.content[i:], nextMatch, m.matchHighlightStyle.Render(nextMatch), 1)
|
||||
|
||||
// Update the postion of the last found match.
|
||||
for i = 0; s.query.FindString(m.content[i:s.lastMatchLoc]) != ""; i++ {
|
||||
|
|
Loading…
Reference in a new issue