From dbccd7e30f40d9a7485c7537b415473ffc09b3d3 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Sun, 6 Mar 2022 19:34:12 +0300 Subject: Use round instead of ceil for line position Ceiling line position results in strikeout line being lower than it should. --- alacritty/src/renderer/rects.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'alacritty/src') 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; -- cgit