Merge from Julien Thewys to fix searching with infinite scrollback
This commit is contained in:
commit
a668d8afba
|
@ -1,5 +1,6 @@
|
|||
terminator 0.96:
|
||||
* Unity support for opening new windows (Lucian Adrian Grijincu)
|
||||
* Fix searching with infinite scrollback (Julien Thewys #755077)
|
||||
|
||||
terminator 0.95:
|
||||
* Add a configuration option to enable a DBus server
|
||||
|
|
|
@ -127,7 +127,7 @@ class Searchbar(gtk.HBox):
|
|||
"""Search forwards and jump to the next result, if any"""
|
||||
startrow,endrow = self.get_vte_buffer_range()
|
||||
while True:
|
||||
if self.searchrow == endrow:
|
||||
if self.searchrow >= endrow:
|
||||
self.searchrow = startrow
|
||||
self.reslabel.set_text(_('No more results'))
|
||||
return
|
||||
|
@ -148,7 +148,7 @@ class Searchbar(gtk.HBox):
|
|||
"""Jump back to the previous search"""
|
||||
startrow,endrow = self.get_vte_buffer_range()
|
||||
while True:
|
||||
if self.searchrow == startrow:
|
||||
if self.searchrow <= startrow:
|
||||
self.searchrow = endrow
|
||||
self.reslabel.set_text(_('No more results'))
|
||||
return
|
||||
|
@ -177,6 +177,9 @@ class Searchbar(gtk.HBox):
|
|||
def get_vte_buffer_range(self):
|
||||
"""Get the range of a vte widget"""
|
||||
column, endrow = self.vte.get_cursor_position()
|
||||
if self.config['scrollback_lines'] < 0:
|
||||
startrow = 0
|
||||
else:
|
||||
startrow = max(0, endrow - self.config['scrollback_lines'])
|
||||
return(startrow, endrow)
|
||||
|
||||
|
|
Loading…
Reference in New Issue