aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-07-30 12:48:11 +0200
committerMattias Andrée <maandree@operamail.com>2013-07-30 12:48:11 +0200
commitfc1b261a65efc54815146633cb145123a09db551 (patch)
treed9070b1bdca6d24071779e34a410f78e62f08e2e
parentregression (diff)
downloadpytagomacs-fc1b261a65efc54815146633cb145123a09db551.tar.gz
pytagomacs-fc1b261a65efc54815146633cb145123a09db551.tar.bz2
pytagomacs-fc1b261a65efc54815146633cb145123a09db551.tar.xz
input fix
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--src/trees.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/trees.py b/src/trees.py
index 851553a..938f63a 100644
--- a/src/trees.py
+++ b/src/trees.py
@@ -356,7 +356,7 @@ class Tree():
return ('read', self.select_stack[-1][0])
elif buf.endswith('R'):
return ('unread', self.select_stack[-1][0])
- elif ord('0') <= ord(buf[-1]) <= ord('9'):
+ elif (buf[-3] != '\033' or buf[-2] != '[') and (buf[-5] != '\033' or buf[-4] != '[' or buf[-2] != ';') and (ord('0') <= ord(buf[-1]) <= ord('9')):
return (buf[-1], self.select_stack[-1][0])
elif buf.endswith('\t'):
return ('back', None)