- #Remove the incomplete line
- if self.getHistoryLen()>0 and (len(self.history[-1])==0 or self.history[-1]!='\n') :
- del self.history[-1]
+ def stopDbg(self):
+
+ if self.childpid != None:
+ #9=KILL, 15=TERM
+ os.kill(self.childpid, 15);
+ self.childpid = None
+
+
+
+ def contents_changed(self, term):
+ assert( self.getHistoryLen()>0 )
+
+ c,r = term.get_cursor_position()
+ text = self.get_text_range(self.lastr,self.lastc,r,c-1,lambda *w:True)
+ self.lastc, self.lastr = c,r