parent
399f00b7ee
commit
7fc86c3e9a
11
mode/pipe.py
11
mode/pipe.py
|
@ -24,21 +24,24 @@ class Pipe(Fundamental):
|
||||||
Fundamental.__init__(self, w)
|
Fundamental.__init__(self, w)
|
||||||
|
|
||||||
keys = self.bindings.keys()
|
keys = self.bindings.keys()
|
||||||
|
|
||||||
|
# page-up/page-down/goto-start/goto-end, C-x and M-x should still work
|
||||||
for key in keys:
|
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
|
continue
|
||||||
del self.bindings[key]
|
del self.bindings[key]
|
||||||
|
|
||||||
for i in range(0, 128):
|
for i in range(0, 128):
|
||||||
# skip C-x and ESC
|
if i in (22, 24, 27):
|
||||||
if i in (24, 27):
|
|
||||||
continue
|
continue
|
||||||
sym = keyinput.MAP.get(i, chr(i))
|
sym = keyinput.MAP.get(i, chr(i))
|
||||||
obj = PipeInsertChr(i)
|
obj = PipeInsertChr(i)
|
||||||
w.application.methods[obj.name] = obj
|
w.application.methods[obj.name] = obj
|
||||||
self.add_binding(obj.name, sym)
|
self.add_binding(obj.name, sym)
|
||||||
|
|
||||||
if i != ord('x'):
|
if i not in (ord('x'), ord('v'), ord('>'), ord('<')):
|
||||||
sym2 = 'M-%s' % sym
|
sym2 = 'M-%s' % sym
|
||||||
obj2 = PipeInsertEsc(i)
|
obj2 = PipeInsertEsc(i)
|
||||||
w.application.methods[obj2.name] = obj2
|
w.application.methods[obj2.name] = obj2
|
||||||
|
|
5
term.py
5
term.py
|
@ -194,8 +194,6 @@ class XTerm(Dumb):
|
||||||
# starts with '\033[' and ends with 'm'
|
# starts with '\033[' and ends with 'm'
|
||||||
s2 = s[2:-1]
|
s2 = s[2:-1]
|
||||||
l = s2.split(';')
|
l = s2.split(';')
|
||||||
#if s2 not in ('0', '22', '1'):
|
|
||||||
# raise Exception("l = %r" % l)
|
|
||||||
for n in l:
|
for n in l:
|
||||||
if n == '0':
|
if n == '0':
|
||||||
self._fg = 'default'
|
self._fg = 'default'
|
||||||
|
@ -270,11 +268,8 @@ class XTerm(Dumb):
|
||||||
if name not in ['home']:
|
if name not in ['home']:
|
||||||
self._meta = []
|
self._meta = []
|
||||||
elif self.style_re.match(s):
|
elif self.style_re.match(s):
|
||||||
#raise Exception('%r %d' % (s, len(s)))
|
|
||||||
self.parse_style(s)
|
self.parse_style(s)
|
||||||
self.term_do_style()
|
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 = []
|
self._meta = []
|
||||||
elif self.text_signal_re.match(s):
|
elif self.text_signal_re.match(s):
|
||||||
self._meta = []
|
self._meta = []
|
||||||
|
|
Loading…
Reference in New Issue