summaryrefslogtreecommitdiff
path: root/tcvt.py
diff options
context:
space:
mode:
Diffstat (limited to 'tcvt.py')
-rwxr-xr-xtcvt.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tcvt.py b/tcvt.py
index 8fd42cd..99a332f 100755
--- a/tcvt.py
+++ b/tcvt.py
@@ -307,6 +307,11 @@ class Terminal:
curses.beep()
elif char == '\b':
self.screen.relmove(0, -1)
+ elif char == '\t':
+ y, x = self.screen.getyx()
+ _, xm = self.screen.getmaxyx()
+ x = min(x + 8 - x % 8, xm - 1)
+ self.screen.move(y, x)
else:
raise ValueError("feed %r" % char)