def dump_components(self):
"""
Dumps the screen and renditions as-is, the scrollback buffer as HTML,
and the current cursor coordinates. Also, empties the scrollback buffer
.. note:: This was used in some performance-related experiments but might be useful for other patterns in the future so I've left it here.
"""
screen = [a.tounicode() for a in self.screen]
scrollback = []
if self.scrollback_buf:
# Process the scrollback buffer into HTML
scrollback = self._spanify_scrollback(
self.scrollback_buf, self.scrollback_renditions)
# Empty the scrollback buffer:
self.init_scrollback()
self.modified = False
return (scrollback, screen, self.renditions, self.cursorY, self.cursorX)
评论列表
文章目录