emulation

--HG--
branch : pmacs2
This commit is contained in:
moculus 2009-02-24 19:54:32 +00:00
parent 884eecfe6e
commit 52d645a96f
2 changed files with 14 additions and 4 deletions

View File

@ -46,6 +46,19 @@ class XTermBuffer(Buffer, XTerm):
def term_do_clear(self): def term_do_clear(self):
self.set_lines([''], force=True) self.set_lines([''], force=True)
self._meta = [] 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): def term_do_backspace(self):
self._w().backward() self._w().backward()
def term_do_tab(self): def term_do_tab(self):

View File

@ -27,10 +27,7 @@ class Dumb:
def term_do_clear_bol(self): def term_do_clear_bol(self):
pass pass
def term_do_clear_eol(self): def term_do_clear_eol(self):
try:
del self.outc[self.i:] del self.outc[self.i:]
except:
raise Exception(str(dir(self)))
def term_do_clear_eos(self): def term_do_clear_eos(self):
pass pass