From 7fc86c3e9a6b3b5adabd673686e72dde0cdd4cd6 Mon Sep 17 00:00:00 2001 From: moculus Date: Sun, 15 Mar 2009 02:53:04 +0000 Subject: [PATCH] pipe pipe pipe pipe --HG-- branch : pmacs2 --- mode/pipe.py | 11 +++++++---- term.py | 5 ----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/mode/pipe.py b/mode/pipe.py index 0c46733..83349d8 100644 --- a/mode/pipe.py +++ b/mode/pipe.py @@ -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 diff --git a/term.py b/term.py index 54a01e3..c7aed07 100644 --- a/term.py +++ b/term.py @@ -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 = []