Implement pager scrollback history buffer

For now, use big fixed-size buffer that is lost on resize
This commit is contained in:
Dominique Martinet
2018-09-22 18:02:11 +09:00
parent a4c2a9ef0d
commit d0104660c8
3 changed files with 89 additions and 5 deletions
+9 -1
View File
@@ -173,11 +173,19 @@ typedef struct {
line_attrs_type *line_attrs;
} HistoryBufSegment;
typedef struct {
index_type bufsize;
Py_UCS4 *buffer;
index_type start, end;
index_type bufend;
} PagerHistoryBuf;
typedef struct {
PyObject_HEAD
index_type xnum, ynum, num_segments;
HistoryBufSegment* segments;
HistoryBufSegment *segments;
PagerHistoryBuf pagerhist;
Line *line;
index_type start_of_data, count;
} HistoryBuf;