diff options
author | Christian Duerr <contact@christianduerr.com> | 2018-05-15 22:36:14 +0200 |
---|---|---|
committer | Christian Duerr <contact@christianduerr.com> | 2018-05-15 22:44:21 +0200 |
commit | b12ae5105ac0063b594202682ce6183a64cc708a (patch) | |
tree | f982e1c444b03808c8e9a75376560c1aaadffec4 /tests/ref/history/config.json | |
parent | d62babe22fce3bfb08c8f9ca02eeae78590a74d1 (diff) | |
download | alacritty-b12ae5105ac0063b594202682ce6183a64cc708a.tar.gz alacritty-b12ae5105ac0063b594202682ce6183a64cc708a.zip |
Truncate invisible lines before storing ref-tests
Because there is no good way to store invisible lines in a backwards-
and forwards-compatible way, they buffer now gets truncated before
dumping the state of a grid when creating a ref-test.
This involved a few workaround of which a few required adding additional
methods which are only used in ref-tests, these should be minimal
though.
Since this required the creation of a truncation method anyways, some
logic has been added which automatically truncates the invisible buffer
when there are more than X (set to 100) invisible lines. This should not
impact performance because it rarely occurs, but it could save a bit of
memory when the history size is shrunk during runtime (see #1293).
This also adds an optional `config.json` file to the ref-test output
where it is possible to manually specify variables which should override
config defaults, this has been used only for history_size so far.
Creating a new ref-test does also still work, so there was no regression
here, if history size is altered, the config.json just has to be created
manually with the content `{"history_size":HIST_SIZE}`, where
`HIST_SIZE` is the desired history size.
Diffstat (limited to 'tests/ref/history/config.json')
-rw-r--r-- | tests/ref/history/config.json | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/ref/history/config.json b/tests/ref/history/config.json new file mode 100644 index 00000000..5cca8022 --- /dev/null +++ b/tests/ref/history/config.json @@ -0,0 +1 @@ +{"history_size":1000} |