From 843583e2246a2404999b6c36293d7966cfb84334 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Wed, 15 Sep 2021 12:13:09 -0600 Subject: Add overline attribute. --- alacritty/src/renderer/rects.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'alacritty/src/renderer/rects.rs') diff --git a/alacritty/src/renderer/rects.rs b/alacritty/src/renderer/rects.rs index f4e98bcf..61ff91b7 100644 --- a/alacritty/src/renderer/rects.rs +++ b/alacritty/src/renderer/rects.rs @@ -99,6 +99,18 @@ impl RenderLine { color, )); }, + Flags::OVERLINE => { + let start_x = start.column.0 as f32 * size.cell_width(); + let end_x = (end.column.0 + 1) as f32 * size.cell_width(); + rects.push(RenderRect::new( + start_x + size.padding_x(), + start.line as f32 * size.cell_height(), + end_x - start_x, + metrics.underline_thickness, + color, + 1., + )); + }, Flags::STRIKEOUT => { rects.push(Self::create_rect( size, @@ -235,6 +247,7 @@ impl RenderLines { self.update_flag(cell, Flags::DOUBLE_UNDERLINE); self.update_flag(cell, Flags::STRIKEOUT); self.update_flag(cell, Flags::UNDERCURL); + self.update_flag(cell, Flags::OVERLINE); } /// Update the lines for a specific flag. -- cgit