From 52d645a96f6c5afee7649ac6aaaf06fddc03e8a1 Mon Sep 17 00:00:00 2001 From: moculus Date: Tue, 24 Feb 2009 19:54:32 +0000 Subject: [PATCH] emulation --HG-- branch : pmacs2 --- buffer/emul.py | 13 +++++++++++++ term.py | 5 +---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/buffer/emul.py b/buffer/emul.py index bd9da2c..49739e4 100644 --- a/buffer/emul.py +++ b/buffer/emul.py @@ -46,6 +46,19 @@ class XTermBuffer(Buffer, XTerm): def term_do_clear(self): self.set_lines([''], force=True) self._meta = [] + def term_do_clear_bol(self): + w = self._w() + p1, p2 = w.get_line_left() + self.delete(p1, p2, force=True) + self._meta = [] + def term_do_clear_eol(self): + w = self._w() + p1, p2 = w.get_line_right() + self.delete(p1, p2, force=True) + self._meta = [] + def term_do_clear_eos(self): + self._meta = [] + def term_do_backspace(self): self._w().backward() def term_do_tab(self): diff --git a/term.py b/term.py index e49f251..f2556f9 100644 --- a/term.py +++ b/term.py @@ -27,10 +27,7 @@ class Dumb: def term_do_clear_bol(self): pass def term_do_clear_eol(self): - try: - del self.outc[self.i:] - except: - raise Exception(str(dir(self))) + del self.outc[self.i:] def term_do_clear_eos(self): pass