Minor fix to trim newline, plus some trailing chars from next line when searching

This commit is contained in:
Stephen Boddy 2015-06-21 04:34:07 +02:00
parent 1d08a1840f
commit 3d7d4203f1
1 changed files with 2 additions and 0 deletions

View File

@ -162,6 +162,7 @@ class Searchbar(gtk.HBox):
return return
buffer = self.vte.get_text_range(row, 0, row + 1, 0, self.search_character) buffer = self.vte.get_text_range(row, 0, row + 1, 0, self.search_character)
buffer = buffer[:buffer.find('\n')]
matches = self.searchre.search(buffer) matches = self.searchre.search(buffer)
if matches: if matches:
self.searchrow = row self.searchrow = row
@ -186,6 +187,7 @@ class Searchbar(gtk.HBox):
return return
buffer = self.vte.get_text_range(row, 0, row + 1, 0, self.search_character) buffer = self.vte.get_text_range(row, 0, row + 1, 0, self.search_character)
buffer = buffer[:buffer.find('\n')]
matches = self.searchre.search(buffer) matches = self.searchre.search(buffer)
if matches: if matches:
self.searchrow = row self.searchrow = row