Terminal scrollback with ring buffer
This patch adds a ring buffer for scrollback to the terminal. The advantage of using a ring buffer is that the common case, scrolling with no static screen content, can be achieved very efficiently by incrementing and decrementing the starting line (modulo buffer size). The scrollback buffer is limited to HISTSIZE lines in order to bound memory usage. As the lines are allocated on demand, it is possible to implement unlimited scrollback with few changes. If the terminal is reset, the scroll back buffer is reset, too. (apply st-scrollback-ringbuffer-0.8.5.diff on top of colorscheme)
This commit is contained in: