+ text = self.get_text_range(self.lastr,0,r,c,lambda *w:True)
+ self.lastc, self.lastr = c,r
+
+ #Remove annoying \n at the end
+ assert(text[-1] == "\n")
+ text = text[:-1]
+
+ #Get the lines and remove empty lines
+ lines = string.split(text, "\n")
+
+ #Remove the incomplete line
+ len = max(0,self.getHistoryLen())
+ self.history[-1] = lines[0]
+ self.history += lines[1:]
+
+
+ #Check if activity status has been changed
+ for i in range(len, self.getHistoryLen()):
+ line = self.history[i]
+
+ res = self.testForInactivity(i)
+ if res != None:
+ while self.activityChanged != None:
+ print "wait for pending activity"
+ gtk.main_iteration()