diff --git a/r0c/ivt100.py b/r0c/ivt100.py index 5cf85a4..5044416 100644 --- a/r0c/ivt100.py +++ b/r0c/ivt100.py @@ -2869,21 +2869,10 @@ class VT100_Client(object): self.linebuf = u"" self.linepos = 0 - elif act == "pgup" or act == "pgdn": - - steps = self.h - 4 - if self.scroll_i is not None: - steps = self.scroll_i - elif self.scroll_f is not None: - steps = int(steps * self.scroll_f) - else: - print("no scroll size?!") - - if act == "pgup": - steps *= -1 - - self.scroll_cmd += steps - + elif act == "pgup": + self.user.exec_cmd("u") + elif act == "pgdn": + self.user.exec_cmd("d") elif act == "redraw": self.user.exec_cmd("r") elif act == "view": diff --git a/r0c/user.py b/r0c/user.py index a4084bb..ceb6536 100644 --- a/r0c/user.py +++ b/r0c/user.py @@ -463,11 +463,20 @@ class User(object): self.world.send_chan_msg(self.nick, uchan.nchan, arg2) self.client.refresh(False, True) - elif cmd == u"up" or cmd == u"u": - self.client.scroll_cmd += -(self.client.h - 4) + elif cmd == u"up" or cmd == u"u" or cmd == u"down" or cmd == u"d": + cli = self.client + steps = cli.h - 4 + if cli.scroll_i is not None: + steps = cli.scroll_i + elif cli.scroll_f is not None: + steps = int(steps * cli.scroll_f) + else: + print("no scroll size?!") - elif cmd == u"down" or cmd == u"d": - self.client.scroll_cmd += +(self.client.h - 4) + if cmd == u"up" or cmd == u"u": + steps *= -1 + + cli.scroll_cmd += steps elif cmd == u"latest" or cmd == u"l": self.active_chan.lock_to_bottom = True