Implement viewing of the scrollback buffer in a separate window

This commit is contained in:
Kovid Goyal
2016-12-10 12:59:20 +05:30
parent 41c63917c8
commit 9a7b23fd23
8 changed files with 106 additions and 20 deletions
+6
View File
@@ -412,6 +412,12 @@ class CharGrid:
if ps:
set_primary_selection(ps)
def get_scrollback_as_ansi(self):
ans = []
self.screen.historybuf.as_ansi(ans.append)
self.screen.linebuf.as_ansi(ans.append)
return ''.join(ans).encode('utf-8')
def text_for_selection(self, sel=None):
s = sel or self.current_selection
return s.text(self.screen.linebuf, self.screen.historybuf)