Commit graph

14 commits

Author SHA1 Message Date
Daniel Eklöf
ebf0a11fa0
render: add render_refresh() 2019-07-24 20:11:41 +02:00
Daniel Eklöf
6e4c31960a
scrollback: limit maximum number of lines one can scrollback at once 2019-07-11 18:34:03 +02:00
Daniel Eklöf
cbac302ba1
scrollback: fix assertions in debug builds; need to wrap row number 2019-07-11 18:25:46 +02:00
Daniel Eklöf
5a92202a49
scrollback: in debug, verify all rows in the view are initialized 2019-07-10 16:36:10 +02:00
Daniel Eklöf
1ff1b3a71e
grid: don't pre-allocate the entire grid (with all scrollback lines)
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.
2019-07-10 16:27:55 +02:00
Daniel Eklöf
5144fcba0c
scrollback: disable debug logging 2019-07-10 14:45:00 +02:00
Daniel Eklöf
607755536f
scrollback: use term_damage_view() 2019-07-10 14:43:46 +02:00
Daniel Eklöf
a01efd07e3
scrollback: don't allow more scrolling when already at the top or bottom 2019-07-10 14:42:48 +02:00
Daniel Eklöf
d8d4b34362
scrollback: fix scrolling outside initialized lines in new terminal 2019-07-10 14:28:20 +02:00
Daniel Eklöf
18c61a9a2a
scrollback: fix off-by-one when grid size matches terminal/window size 2019-07-10 09:55:53 +02:00
Daniel Eklöf
ed0fd2d442
scrollback: don't redraw if view doesn't change 2019-07-10 09:30:35 +02:00
Daniel Eklöf
1d338f8477
scrollback: don't scroll past scrollback history 2019-07-10 09:29:36 +02:00
Daniel Eklöf
b058e6384a
scrollback: initial support for mouse scrolling 2019-07-10 09:15:37 +02:00
Daniel Eklöf
bcd111d203
wip: initial scroll back support
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...
2019-07-09 16:26:36 +02:00