/ss didn't affect /up and /down

This commit is contained in:
ed 2024-04-26 23:12:57 +00:00
parent d9c584fae3
commit f36ed61793
2 changed files with 17 additions and 19 deletions

View File

@ -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":

View File

@ -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