def insertAtCursor(self, b):
if b == '\r':
self.x = 0
elif b == '\n' or self.x >= self.width:
self.x = 0
self._scrollDown()
if b in string.printable and b not in '\r\n':
ch = (b, self._currentCharacterAttributes())
if self.modes.get(insults.modes.IRM):
self.lines[self.y][self.x:self.x] = [ch]
self.lines[self.y].pop()
else:
self.lines[self.y][self.x] = ch
self.x += 1
评论列表
文章目录