summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/renderer/mod.rs
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2019-11-03 21:59:28 +0100
committerGitHub <noreply@github.com>2019-11-03 21:59:28 +0100
commitb47a88b142a8987f1d0d48db8c0db1e5f3048a76 (patch)
tree0863fb40b8e081ccc40f1437e74c49a68f4e6c59 /alacritty_terminal/src/renderer/mod.rs
parentfa6ceacfa4158c568c55dff85621788ff1df4099 (diff)
downloadalacritty-b47a88b142a8987f1d0d48db8c0db1e5f3048a76.tar.gz
alacritty-b47a88b142a8987f1d0d48db8c0db1e5f3048a76.zip
Fix URL highlighting
Fixes #2898. Fixes #2479.
Diffstat (limited to 'alacritty_terminal/src/renderer/mod.rs')
-rw-r--r--alacritty_terminal/src/renderer/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/alacritty_terminal/src/renderer/mod.rs b/alacritty_terminal/src/renderer/mod.rs
index 76daac91..b200743a 100644
--- a/alacritty_terminal/src/renderer/mod.rs
+++ b/alacritty_terminal/src/renderer/mod.rs
@@ -382,8 +382,8 @@ impl GlyphCache {
let grid_width = cell_width as u32 * dimensions.columns_u32();
let grid_height = cell_height as u32 * dimensions.lines_u32();
- let width = (f64::from(grid_width) + 2. * padding_x).floor();
- let height = (f64::from(grid_height) + 2. * padding_y).floor();
+ let width = padding_x.mul_add(2., f64::from(grid_width)).floor();
+ let height = padding_y.mul_add(2., f64::from(grid_height)).floor();
Some((width, height))
}