From 37d848372864a70e4912f39f7ef75c0060069a0a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 4 Feb 2022 13:37:38 +0530 Subject: [PATCH] Fix a regression in the previous release that broke strikethrough --- docs/changelog.rst | 2 ++ kitty/cell_vertex.glsl | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index ee155f7c7..c77ac8d79 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -91,6 +91,8 @@ Detailed list of changes - macOS: Add the default shortcut :kbd:`cmd+k` to clear the terminal screen and scrollback up to the cursor (:iss:`4625`) +- Fix a regression in the previous release that broke strikethrough (:disc:`4632`) + 0.24.2 [2022-02-03] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/cell_vertex.glsl b/kitty/cell_vertex.glsl index af772a0c5..0d7dd699b 100644 --- a/kitty/cell_vertex.glsl +++ b/kitty/cell_vertex.glsl @@ -79,7 +79,7 @@ const uint COLOR_MASK = uint(0x4000); const uint ZERO = uint(0); const uint ONE = uint(1); const uint TWO = uint(2); -const uint FOUR = uint(4); +const uint SIX = uint(6); const uint SEVEN = uint(7); vec3 color_to_vec(uint c) { @@ -194,7 +194,7 @@ void main() { decoration_fg = choose_color(float(is_selected & ONE), selection_color, decoration_fg); // Underline and strike through (rendered via sprites) underline_pos = choose_color(in_url, to_sprite_pos(pos, url_style, ZERO, ZERO), to_sprite_pos(pos, (text_attrs >> DECORATION_SHIFT) & SEVEN, ZERO, ZERO)); - strike_pos = to_sprite_pos(pos, ((text_attrs >> STRIKE_SHIFT) & ONE) * FOUR, ZERO, ZERO); + strike_pos = to_sprite_pos(pos, ((text_attrs >> STRIKE_SHIFT) & ONE) * SIX, ZERO, ZERO); // Cursor cursor_color_vec = vec4(color_to_vec(cursor_bg), 1.0);