aboutsummaryrefslogtreecommitdiff
path: root/grid.c (follow)
Commit message (Collapse)AuthorAgeLines
* grid: implement a memmove-sort-of functionDaniel Eklöf2019-07-01-0/+33
| | | | | grid_memmove() moves cell data from one index to another, taking the grid offset into account.
* wip: use a sliding window instead of memmove() to scrollDaniel Eklöf2019-07-01-0/+34
| | | | | Instead of memmoving a large amount of data on every scroll, use a sliding window. That is, each time we scroll, we offset origin.
* Rename grid_* functions to term_*Daniel Eklöf2019-06-29-303/+0
|
* grid: attributes now track whether we've set a foreground/background colorDaniel Eklöf2019-06-26-8/+0
| | | | | | | | | This means we don't have to explicitly set the foreground/background to the grid's default colors whenever we reset/clear a cell, and we can instead simply memset() the entire cell to 0. This also means the renderer has to get the default color when rendering a cell without a foreground/background color set.
* scroll: let the render erase the scrolled up regionDaniel Eklöf2019-06-26-25/+19
| | | | | | The grid scroll operation no longer inserts a DAMAGE_ERASE operation, but instead manually clears the region. The render does the corresponding thing.
* scroll-region: don't clear damage queue when changing scroll regionDaniel Eklöf2019-06-25-119/+96
| | | | | | | | | | | | | | | | | | | | | | Vim, for example, changes the scroll region every time you scroll a single line. Thus, resetting the damage queue is slow. This reworks the damage handling of scroll updates: * Split damage queue into two: one for scroll operations and one for update/erase operations. * Don't separate update/erase operations inside/outside the scroll region * Store the current scroll region in the scroll damage operation. This allows us to stack multiple scroll operations with different scroll regions. * When updating update/erase operations after a scroll operation, split the update/erase operations if necessary (the current scroll operation may have a scroll region different from before, thus forcing us to split existing update/erase operations. * The renderer no longer erases after a scroll. The scroll operation also adds an erase operation. This also means that erase operation are subject to adjustments by later scroll operations.
* grid: scroll reverse: hopefully done correct nowDaniel Eklöf2019-06-24-3/+3
|
* grid: scroll: fix start/end for erase regionDaniel Eklöf2019-06-24-3/+4
|
* scrolling region: wipDaniel Eklöf2019-06-23-44/+95
|
* vt: wip: implement scrolling regionDaniel Eklöf2019-06-23-29/+21
| | | | | | | | | | This is largely untested, but existing scrolling code has been converted to using a terminal-global scrolling region that is defined as start-end of the scrollable region. This is compared to the old code where the scrolling region where defined in terms of marginals, counted in lines from top and from bottom.
* vt: implement reverse scrolling (terminfo 'ri')Daniel Eklöf2019-06-23-21/+74
| | | | | This currently duplicates the code paths for DAMAGE_SCROLL; there are many similarities between the two, but also major differences...
* grid: implement DAMAGE_SCROLLDaniel Eklöf2019-06-21-10/+79
|
* render: break up grid_render()Daniel Eklöf2019-06-19-1/+2
|
* Use a 'damage' list to communicate what needs to be updatedDaniel Eklöf2019-06-19-8/+85
| | | | | | | | | | Instead of having each cell in the grid track it's own dirtiness, grid operations now append "damage" to a list. This list is consumed every time we render the grid. This allows us to special case some operations, like erase (and in the future, scroll).
* grid: erase: memset() the entire range in one callDaniel Eklöf2019-06-19-3/+5
|
* wip: initial scrolling support (no scrollback though)Daniel Eklöf2019-06-19-0/+24
|
* wip: initial input handlingDaniel Eklöf2019-06-19-30/+14
|
* grid: track both linear and row,col cursorDaniel Eklöf2019-06-17-7/+66
|
* vt: handle cursor-at-right-edgeDaniel Eklöf2019-06-17-0/+1
| | | | | | When printing to the right-most-cell, don't advance the cursor. Instead, set a flag that indicates that the *next* print should line-wrap.
* wip: vt parsing: break out grid operating functionsDaniel Eklöf2019-06-17-0/+34