made prev match wrap around

This commit is contained in:
Mikael Fangel 2023-04-06 20:00:19 +02:00 committed by Maas Lalani
parent 1dee9fec2b
commit b3c1f626b6
No known key found for this signature in database
GPG key ID: 5A6ED5CBF1A0A000

View file

@ -115,7 +115,7 @@ func (s *search) PrevMatch(m *model) {
s.matchIndex = (s.matchIndex - 1) % len(allMatches)
if s.matchIndex < 0 {
s.matchIndex = 0
s.matchIndex = len(allMatches) - 1
}
leftPad, rightPad := utils.LipglossPadding(m.matchStyle)