Updated call to get_text_range() for search to work.

Instead of using -1 to indicate the last character of a line, search the
current row up to the next row.  This appears to fix the search box for ubuntu
10.10.
This commit is contained in:
Roberto Aguilar 2011-03-21 22:57:18 -07:00
parent 00871f3061
commit 189cce4507
1 changed files with 3 additions and 3 deletions

View File

@ -131,8 +131,8 @@ class Searchbar(gtk.HBox):
self.searchrow = startrow self.searchrow = startrow
self.reslabel.set_text(_('No more results')) self.reslabel.set_text(_('No more results'))
return return
buffer = self.vte.get_text_range(self.searchrow, 0, buffer = self.vte.get_text_range(self.searchrow, 0,
self.searchrow, -1, self.searchrow+1, 0,
self.search_character) self.search_character)
index = buffer.find(self.searchstring) index = buffer.find(self.searchstring)
@ -153,7 +153,7 @@ class Searchbar(gtk.HBox):
self.reslabel.set_text(_('No more results')) self.reslabel.set_text(_('No more results'))
return return
buffer = self.vte.get_text_range(self.searchrow, 0, buffer = self.vte.get_text_range(self.searchrow, 0,
self.searchrow, -1, self.searchrow+1, 0,
self.search_character) self.search_character)
index = buffer.find(self.searchstring) index = buffer.find(self.searchstring)