From 23aea68e325471160e05f38832bdd04ee4bb4cee Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 30 Oct 2018 15:00:47 +0530 Subject: [PATCH] Fix second cell of emoji created using variation selectors not having the same attributes as the first cell Fix #1109 --- docs/changelog.rst | 2 ++ kitty/screen.c | 1 + 2 files changed, 3 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 305d886ab..f097698ff 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -57,6 +57,8 @@ Changelog - Fix :opt:`mouse_hide_wait` only taking effect after an event such as cursor blink or key press (:iss:`1073`) +- Fix second cell of emoji created using variation selectors not having + the same attributes as the first cell (:iss:`1109`) 0.12.3 [2018-09-29] ------------------------------ diff --git a/kitty/screen.c b/kitty/screen.c index e24c60dcd..16390d681 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -366,6 +366,7 @@ draw_combining_char(Screen *self, char_type ch) { CPUCell *cpu_cell = self->linebuf->line->cpu_cells + xpos; GPUCell *gpu_cell = self->linebuf->line->gpu_cells + xpos; if ((gpu_cell->attrs & WIDTH_MASK) != 2 && cpu_cell->cc_idx[0] == VS16 && is_emoji_presentation_base(cpu_cell->ch)) { + if (xpos < self->columns - 1) line_set_char(self->linebuf->line, self->cursor->x, 0, 0, self->cursor, true); gpu_cell->attrs = (gpu_cell->attrs & !WIDTH_MASK) | 2; if (xpos == self->columns - 1) move_widened_char(self, cpu_cell, gpu_cell, xpos, ypos); else self->cursor->x++;