summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-11-01 14:49:04 (GMT)
committerGuido van Rossum <guido@python.org>1993-11-01 14:49:04 (GMT)
commit0b26a19a4f9088702fdef9b8a2e86b0db2217570 (patch)
tree5ddaded73f904811629b1bcb484b9841d10c1430
parentb71f879bafc280157710e0d496f131e6e6175a18 (diff)
downloadcpython-0b26a19a4f9088702fdef9b8a2e86b0db2217570.zip
cpython-0b26a19a4f9088702fdef9b8a2e86b0db2217570.tar.gz
cpython-0b26a19a4f9088702fdef9b8a2e86b0db2217570.tar.bz2
Fix bug in backup inside esc sequence.
-rwxr-xr-xDemo/cwilib/vt100.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Demo/cwilib/vt100.py b/Demo/cwilib/vt100.py
index e802389..9edd481 100755
--- a/Demo/cwilib/vt100.py
+++ b/Demo/cwilib/vt100.py
@@ -82,6 +82,8 @@ class VT100:
self.fill_top()
def send(self, buffer):
+ self.msg('send: unfinished=%s, buffer=%s',
+ `self.unfinished`, `buffer`)
self.unfinished = self.unfinished + buffer
i = 0
n = len(self.unfinished)
@@ -110,7 +112,7 @@ class VT100:
break
argstr = argstr + c
else:
- i = i - len(argstr)
+ i = i - len(argstr) - 2
break
## self.msg('found ESC [ %s %s' % (`argstr`, `c`))
args = string.splitfields(argstr, ';')