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