[pypy-commit] pyrepl py3ksupport: allow consoles to stream in events that dont need translation
RonnyPfannschmidt
noreply at buildbot.pypy.org
Wed Oct 19 10:44:52 CEST 2011
Author: Ronny Pfannschmidt <Ronny.Pfannschmidt at gmx.de>
Branch: py3ksupport
Changeset: r139:af08afe96096
Date: 2011-10-19 09:25 +0200
http://bitbucket.org/pypy/pyrepl/changeset/af08afe96096/
Log: allow consoles to stream in events that dont need translation
diff --git a/pyrepl/reader.py b/pyrepl/reader.py
--- a/pyrepl/reader.py
+++ b/pyrepl/reader.py
@@ -552,6 +552,8 @@
if not event: # can only happen if we're not blocking
return None
+ translate = True
+
if event.evt == 'key':
self.input_trans.push(event)
elif event.evt == 'scroll':
@@ -559,9 +561,12 @@
elif event.evt == 'resize':
self.refresh()
else:
- pass
+ translate = False
- cmd = self.input_trans.get()
+ if translate:
+ cmd = self.input_trans.get()
+ else:
+ cmd = event.evt, event.data
if cmd is None:
if block:
More information about the pypy-commit
mailing list