diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-03-13 07:07:40 +0100 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2018-03-12 23:07:40 -0700 |
commit | b9ad0cfad30c6fd1328658d8195f552f24df6ff9 (patch) | |
tree | 396b4817804c008be4056096159627f5c525e489 /alacritty_macos.yml | |
parent | 1977215b0be083f26d7670ed9c7c837f156274ea (diff) | |
download | alacritty-b9ad0cfad30c6fd1328658d8195f552f24df6ff9.tar.gz alacritty-b9ad0cfad30c6fd1328658d8195f552f24df6ff9.zip |
Prevent negative cell dimensions (#1181)
Prevent the cell dimensions from going below 1, this bug resulted in
allocation of large amounts of memory in the scrollback PR but is also
present on master.
Currently the approach is to just `panic!`, however an `eprintln!` and
`exit` could be an alternative too. I don't think it's realistic to
check this at startup and it should have no performance impact since the
failing method is only called once at startup.
To make it a bit more clear what kind of values are accepted, the
datatypes of offsets and paddings have also been changed so that these
don't accept floats anymore and padding can never be negative.
This should allow us to be a bit more strict with the config to make
sure that errors are printed when invalid values are specified (like
negative padding).
This fixes #1167.
Diffstat (limited to 'alacritty_macos.yml')
-rw-r--r-- | alacritty_macos.yml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/alacritty_macos.yml b/alacritty_macos.yml index 7593cabe..be87a36a 100644 --- a/alacritty_macos.yml +++ b/alacritty_macos.yml @@ -63,15 +63,15 @@ font: # Offset is the extra space around each character. offset.y can be thought of # as modifying the linespacing, and offset.x as modifying the letter spacing. offset: - x: 0.0 - y: 0.0 + x: 0 + y: 0 # Glyph offset determines the locations of the glyphs within their cells with # the default being at the bottom. Increase the x offset to move the glyph to # the right, increase the y offset to move the glyph upward. glyph_offset: - x: 0.0 - y: 0.0 + x: 0 + y: 0 # OS X only: use thin stroke font rendering. Thin strokes are suitable # for retina displays, but for non-retina you probably want this set to |