~roguescholar/alacritty/+git/trunk:syslog-panics

Last commit made on 2018-05-04
Get this branch:
git clone -b syslog-panics https://git.launchpad.net/~roguescholar/alacritty/+git/trunk

Branch merges

Branch information

Name:
syslog-panics
Repository:
lp:~roguescholar/alacritty/+git/trunk

Recent commits

be2c292... by Joe Wilm

Syslog panics - gotta catch'm all!

Previously, panics only were printed when run from a shell. Now, on all
systems (so this is tots broken outside linux), panic reports are
shipped to the syslog with a backtrace.

0853faf... by Christian Duerr <email address hidden>

Remove `push` from `Storage`

Since every line is allocated at startup anyways, the `push` method on
`Storage` has been removed and instead of pushing to the vector the
initialization has been moved to the `with_capacity` method.

This has the advantage that we don't need to keep track of the `len` in
push (like adding one), but we just need to worry about
growing/shrinking the visible area.

946ef1e... by Christian Duerr <email address hidden>

Improve the resizing implementation

Until now the resizing implementation with scrollback has been really
inefficient because it made use of APIs like `Vec::insert`. This has
been rewored with this commit.

A `len` property has been added to the `Storage` struct which keeps
track of the actual length of the raw buffer. This has changed both
shrinking and growing implementations.

With shrinking, no more lines are removed, only the `len` property is
updated to set all lines shrunk to an "invisible" state which cannot be
accessed from the outside, this effectively changes it to a O(1)
operation. The only issue with this would be memory consumption, but
since the maximum shrinkage is the number of lines on one screen, it
should be a rather small impacte (probabl <100 lines usually). If
desired it would be possible to change this to shrink the raw inner
buffer whenever there are more than X lines hidden.

Growing now works in a similar way to shrinking, if the "invisible"
lines are enough, no new lines are inserted but rather the invisible
buffer is made visible again. Otherwise the amount of lines that still
needs to be inserted is added to the raw buffer, but instead of the
inefficient `Vec::insert`, the `Vec::push` API is used now.

This fixes #1271.

cf23f56... by Christian Duerr <email address hidden>

Reset grid 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.

To make resetting efficient, instead of resetting the history,
the scrollback history is hidden by setting `grid.scroll_limit` to `0`.
This will not clear the history but instead just make it inaccessible,
which should have the same effect.

The visible area is reset by the shell itself, so in combination this
clears the complete terminal grid from a user perspective.

This fixes #1242.

8830567... by Christian Duerr <email address hidden>

Fix bright characters in first column

This bug was introduced by the commit which fixed the invisible cursor
in the first column (54b21b66ecc6f8f149d1425567e0e3d766a3ac54). To
resolve this the alternative implementation by @jwilm has been applied
which seems to work out.

This fixes #1259.

2b3ef5f... by Christian Duerr <email address hidden>

Revert "Fix cursor not showing in first column"

This reverts commit 54b21b66ecc6f8f149d1425567e0e3d766a3ac54.

adf4b62... by Joe Wilm

Compile on stable

298c569... by Christian Duerr <email address hidden>

Fix order of lines after resize

There was an issue where the lines would be messed up when the terminal
was resized, this was because lines were just added/removed at the end
of the buffer instead of the actual end of the terminal (since the end
of the terminal might be in the middle of the buffer).

This has been fixed by relying on `self.zero` to determine the position
of the start of the terminal and then calculating where lines have to be
inserted/removed.

Some tests have also been added with documentation that should make it
a little easier to understand how the process works and how the raw
buffer is layed out.

This should all work no matter how big the scrollback history and even
when the currenty viewport is not at the bottom of the terminal output.

e99e400... by Christian Duerr <email address hidden>

Fix scrollback history size 0 bug

There was an issue where alacritty would panic whenever the scrollback
history size is set to 0, this fixes that issue.

The panic was caused by a substraction with unsigned integers which was
underflowing, this has been fixed to use `saturating_sub`.

After that was fixed there was still a bug where scrollback would not
behave correctly because the number of lines in the grid was decided at
startup.
This has been adapted so whenever the size of the terminal changes, the
scrollback history and grid adapts to make sure the number of lines in
the terminal is always the number of visible lines plus the amount of
scrollback lines configured in the config file.

This fixes #1150.

0d56818... by Christian Duerr <email address hidden>

Add documentation to explain the process