pipe pipe pipe pipe

--HG--
branch : pmacs2
This commit is contained in:
moculus 2009-03-15 02:53:04 +00:00
parent 399f00b7ee
commit 7fc86c3e9a
2 changed files with 7 additions and 9 deletions

View File

@ -24,21 +24,24 @@ class Pipe(Fundamental):
Fundamental.__init__(self, w)
keys = self.bindings.keys()
# page-up/page-down/goto-start/goto-end, C-x and M-x should still work
for key in keys:
if key.startswith('C-x') or key.startswith('M-x'):
if key.startswith('C-x'):
continue
if key in ('M-x', 'C-v', 'M-v', 'M-<', 'M->'):
continue
del self.bindings[key]
for i in range(0, 128):
# skip C-x and ESC
if i in (24, 27):
if i in (22, 24, 27):
continue
sym = keyinput.MAP.get(i, chr(i))
obj = PipeInsertChr(i)
w.application.methods[obj.name] = obj
self.add_binding(obj.name, sym)
if i != ord('x'):
if i not in (ord('x'), ord('v'), ord('>'), ord('<')):
sym2 = 'M-%s' % sym
obj2 = PipeInsertEsc(i)
w.application.methods[obj2.name] = obj2

View File

@ -194,8 +194,6 @@ class XTerm(Dumb):
# starts with '\033[' and ends with 'm'
s2 = s[2:-1]
l = s2.split(';')
#if s2 not in ('0', '22', '1'):
# raise Exception("l = %r" % l)
for n in l:
if n == '0':
self._fg = 'default'
@ -270,11 +268,8 @@ class XTerm(Dumb):
if name not in ['home']:
self._meta = []
elif self.style_re.match(s):
#raise Exception('%r %d' % (s, len(s)))
self.parse_style(s)
self.term_do_style()
#if s == '\x1b[1m': raise("ARGH %r" % self.outc)
#if s == '\x1b[1m': raise("ARGH %r" % [self.outc, self._fg, self._bg, self._xt])
self._meta = []
elif self.text_signal_re.match(s):
self._meta = []