aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/renderer/rects.rs
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2022-03-06 19:34:12 +0300
committerGitHub <noreply@github.com>2022-03-06 19:34:12 +0300
commitdbccd7e30f40d9a7485c7537b415473ffc09b3d3 (patch)
tree1e48c72a028e503b28465d64a6e477413ed90bc0 /alacritty/src/renderer/rects.rs
parentd8113dc2b649f5e5b14fa26a08d13968bfa8c096 (diff)
downloadr-alacritty-dbccd7e30f40d9a7485c7537b415473ffc09b3d3.tar.gz
r-alacritty-dbccd7e30f40d9a7485c7537b415473ffc09b3d3.tar.bz2
r-alacritty-dbccd7e30f40d9a7485c7537b415473ffc09b3d3.zip
Use round instead of ceil for line position
Ceiling line position results in strikeout line being lower than it should.
Diffstat (limited to 'alacritty/src/renderer/rects.rs')
-rw-r--r--alacritty/src/renderer/rects.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/alacritty/src/renderer/rects.rs b/alacritty/src/renderer/rects.rs
index 8c600b6b..a4a6bf5d 100644
--- a/alacritty/src/renderer/rects.rs
+++ b/alacritty/src/renderer/rects.rs
@@ -137,7 +137,7 @@ impl RenderLine {
let line_bottom = (start.line as f32 + 1.) * size.cell_height();
let baseline = line_bottom + descent;
- let mut y = (baseline - position - thickness / 2.).ceil();
+ let mut y = (baseline - position - thickness / 2.).round();
let max_y = line_bottom - thickness;
if y > max_y {
y = max_y;