1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-03 04:34:21 -05:00
Commit graph

3 commits

Author SHA1 Message Date
Joe Wilm
c61a912f62 Optimize Row::reset
Now, only cells that have been used are cleared. This is achieved by
using a "occupied" memo on the Row itself. The value, `occ`, is updated
wherever the Row is accessed mutably, and it's cleared to zero in
Row::reset.

The tests for grid scroll_up and scroll_down were updated to include a
test on the value `occ` and slightly refactored, but are otherwise
equivalent to the previous implementation of those tests.

Because of the change to the `Row` struct, the ref tests were updated so
Deserialization keeps working as expected.
2018-06-02 09:56:50 -07:00
Christian Duerr
31c0f291e0 Reduce size of ref tests 2018-06-02 09:56:50 -07:00
Christian Duerr
d39370514a Reset grid content when running reset
In the current scrollback PR the `reset` command does not affect the
scrollback history. To make sure the terminal is properly reset, it
should clear the scrollback history.

This commit fixes this by creating a new and empty grid whenever `reset`
is executed. It takes the current dimensions and history size from the
old grid.

Right now there's an empty ref-test called `grid_reset` without any
content, this should be implemented once #1244 is resolved.

This fixes #1242.
2018-06-02 09:56:50 -07:00