diff --git a/terminatorlib/config.py b/terminatorlib/config.py
index 8812fd18..0e26c313 100755
--- a/terminatorlib/config.py
+++ b/terminatorlib/config.py
@@ -173,6 +173,7 @@ DEFAULTS = {
'scroll_on_keystroke' : True,
'scroll_on_output' : True,
'scrollback_lines' : 500,
+ 'scrollback_infinite' : False,
'exit_action' : 'close',
'palette' :'#000000000000:#cdcd00000000:#0000cdcd0000:\
#cdcdcdcd0000:#30bf30bfa38e:#a53c212fa53c:\
diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade
index 0d8ae2e2..a68eb149 100644
--- a/terminatorlib/preferences.glade
+++ b/terminatorlib/preferences.glade
@@ -2153,7 +2153,7 @@
2
- 3
- 4
+ 4
+ 5
@@ -2186,8 +2186,8 @@
2
- 2
- 3
+ 3
+ 4
@@ -2242,7 +2242,7 @@
4
@@ -2867,7 +2888,6 @@
0.20000000000000001
- -1
10000000
1
10
diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py
index 918f5316..3a921d24 100755
--- a/terminatorlib/prefseditor.py
+++ b/terminatorlib/prefseditor.py
@@ -380,6 +380,9 @@ class PrefsEditor:
# Scrollback lines
widget = guiget('scrollback_lines_spinbutton')
widget.set_value(self.config['scrollback_lines'])
+ # Scrollback infinite
+ widget = guiget('scrollback_infinite')
+ widget.set_active(self.config['scrollback_infinite'])
# Scroll on outut
widget = guiget('scroll_on_output_checkbutton')
widget.set_active(self.config['scroll_on_output'])
@@ -519,6 +522,17 @@ class PrefsEditor:
self.config['scrollback_lines'] = value
self.config.save()
+ def on_scrollback_infinite_toggled(self, widget):
+ """Scrollback infiniteness changed"""
+ spinbutton = self.builder.get_object('scrollback_lines_spinbutton')
+ value = widget.get_active()
+ if value == True:
+ spinbutton.set_sensitive(False)
+ else:
+ spinbutton.set_sensitive(True)
+ self.config['scrollback_infinite'] = value
+ self.config.save()
+
def on_scrollbar_position_combobox_changed(self, widget):
"""Scrollbar position setting changed"""
selected = widget.get_active()
diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py
index 759565e5..97da9b35 100755
--- a/terminatorlib/terminal.py
+++ b/terminatorlib/terminal.py
@@ -629,7 +629,11 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
except TypeError:
err('beep signal unavailable with this version of VTE')
- self.vte.set_scrollback_lines(self.config['scrollback_lines'])
+ if self.config['scrollback_infinite'] == True:
+ scrollback_lines = -1
+ else:
+ scrollback_lines = self.config['scrollback_lines']
+ self.vte.set_scrollback_lines(scrollback_lines)
self.vte.set_scroll_on_keystroke(self.config['scroll_on_keystroke'])
self.vte.set_scroll_on_output(self.config['scroll_on_output'])