aboutsummaryrefslogtreecommitdiff
path: root/commands.c (follow)
Commit message (Collapse)AuthorAgeLines
* scrolling: optimize row access by assuming number of rows is a power of 2Daniel Eklöf2019-08-22-1/+5
| | | | | | | | | | | | | | | | | | | With this assumption, we can replace 'a % b' with 'a & (b - 1)'. In terms of instructions, this means a fast 'and' instead of a slow 'div'. Further optimize scrolling by: * not double-initializing empty rows. Previously, grid_row_alloc() called calloc(), which was then followed by a memset() when scrolling. This is of course unnecessary. * Don't loop the entire set of visible rows (this was done to ensure all visible rows had been allocated, and to prefetch the cell contents). This isn't necessary; only newly pulled in rows can be NULL. For now, don't prefetch at all.
* scrollback: use scroll damage to speed up scrollingDaniel Eklöf2019-08-04-2/+24
| | | | | | When scrolling through the scrollback lines, use scroll damage instead of re-rendering the entire screen whenever it makes sense. I.e. when the number of lines isn't a whole page or more.
* render: add render_refresh()Daniel Eklöf2019-07-24-4/+2
|
* scrollback: limit maximum number of lines one can scrollback at onceDaniel Eklöf2019-07-11-5/+2
|
* scrollback: fix assertions in debug builds; need to wrap row numberDaniel Eklöf2019-07-11-2/+2
|
* scrollback: in debug, verify all rows in the view are initializedDaniel Eklöf2019-07-10-0/+9
|
* grid: don't pre-allocate the entire grid (with all scrollback lines)Daniel Eklöf2019-07-10-2/+2
| | | | | | | | | | The row array may now contain NULL pointers. This means the corresponding row hasn't yet been allocated and initialized. On a resize, we explicitly allocate the visible rows. Uninitialized rows are then allocated the first time they are referenced.
* scrollback: disable debug loggingDaniel Eklöf2019-07-10-1/+1
|
* scrollback: use term_damage_view()Daniel Eklöf2019-07-10-6/+2
|
* scrollback: don't allow more scrolling when already at the top or bottomDaniel Eklöf2019-07-10-6/+9
|
* scrollback: fix scrolling outside initialized lines in new terminalDaniel Eklöf2019-07-10-0/+10
|
* scrollback: fix off-by-one when grid size matches terminal/window sizeDaniel Eklöf2019-07-10-6/+6
|
* scrollback: don't redraw if view doesn't changeDaniel Eklöf2019-07-10-0/+8
|
* scrollback: don't scroll past scrollback historyDaniel Eklöf2019-07-10-4/+31
|
* scrollback: initial support for mouse scrollingDaniel Eklöf2019-07-10-9/+25
|
* wip: initial scroll back supportDaniel Eklöf2019-07-09-0/+61
Can scroll up and down, and stops when the beginning/end of history is reached. However, it probably breaks when the entire scrollback buffer has been filled - we need to detect when the view has wrapped around to the current terminal offset. The detection of when we've reached the bottom of the history is also flawed, and only works when we overshoot the bottom with at least a page. Resizing the windows while in a view most likely doesn't work. The view will not detect a wrapped around scrollback buffer. I.e. if the user has scrolled back, and is stationary at a view, but there is still output being produced. Then eventually the scrollback buffer will wrap around. In this case, the correct thing to do is make the view start following the beginning of the history. Right now it doesn't, meaning once the scrollback buffer wraps around, you'll start seeing command output...