summaryrefslogtreecommitdiff
path: root/examples/twisted_serve_ssh.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/twisted_serve_ssh.py')
-rw-r--r--examples/twisted_serve_ssh.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/twisted_serve_ssh.py b/examples/twisted_serve_ssh.py
index 5335646..c1a0004 100644
--- a/examples/twisted_serve_ssh.py
+++ b/examples/twisted_serve_ssh.py
@@ -200,7 +200,7 @@ class TwistedScreen(Screen):
"""
return self.terminalProtocol.width, self.terminalProtocol.height
- def draw_screen(self, (maxcol, maxrow), r ):
+ def draw_screen(self, maxres, r ):
"""Render a canvas to the terminal.
The canvas contains all the information required to render the Urwid
@@ -208,6 +208,7 @@ class TwistedScreen(Screen):
tuples. This very simple implementation iterates each row and simply
writes it out.
"""
+ (maxcol, maxrow) = maxres
#self.terminal.eraseDisplay()
lasta = None
for i, row in enumerate(r.content()):
@@ -411,9 +412,10 @@ class UrwidTerminalSession(TerminalSession):
IConchUser(self.original),
self.height, self.width)
- def windowChanged(self, (h, w, x, y)):
+ def windowChanged(self, dimensions):
"""Called when the window size has changed.
"""
+ (h, w, x, y) = dimensions
self.chained_protocol.terminalProtocol.terminalSize(h, w)