forked from Mirrors/apostrophe
Fix active search going out of bounds
parent
fc824fc2ef
commit
567e74c99e
|
@ -143,10 +143,7 @@ class SearchAndReplace:
|
||||||
def scrollto(self, index):
|
def scrollto(self, index):
|
||||||
if not self.matches:
|
if not self.matches:
|
||||||
return
|
return
|
||||||
if index < len(self.matches):
|
self.active = index % len(self.matches)
|
||||||
self.active = index
|
|
||||||
else:
|
|
||||||
self.active = 0
|
|
||||||
|
|
||||||
match = self.matches[self.active]
|
match = self.matches[self.active]
|
||||||
start_iter = self.textbuffer.get_iter_at_offset(match[0])
|
start_iter = self.textbuffer.get_iter_at_offset(match[0])
|
||||||
|
|
Loading…
Reference in New Issue