From df0043427e335a77ab50271b512c47d24ea70f69 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Mon, 2 Mar 2015 21:50:29 +0100 Subject: [PATCH] Fix the scroll up/down key bindings to use gtk3 method --- terminatorlib/terminal.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 8b3718cf..706656be 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -1461,18 +1461,18 @@ class Terminal(Gtk.VBox): def scroll_by_page(self, pages): """Scroll up or down in pages""" - amount = pages * self.vte.get_adjustment().get_page_increment() + amount = pages * self.vte.get_vadjustment().get_page_increment() self.scroll_by(int(amount)) def scroll_by_line(self, lines): """Scroll up or down in lines""" - amount = lines * self.vte.get_adjustment().get_step_increment() + amount = lines * self.vte.get_vadjustment().get_step_increment() self.scroll_by(int(amount)) def scroll_by(self, amount): """Scroll up or down by an amount of lines""" - adjustment = self.vte.get_adjustment() - bottom = adjustment.upper - adjustment.page_size + adjustment = self.vte.get_vadjustment() + bottom = adjustment.get_upper() - adjustment.get_page_size() value = adjustment.get_value() + amount adjustment.set_value(min(value, bottom))