From 2aac220cdb755e41989935ea92f51f5c7e46c2a4 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Sat, 22 Sep 2018 17:54:48 +0900 Subject: [PATCH] selection: hilight 2nd half of wide characters last in line --- kitty/lineops.h | 1 + 1 file changed, 1 insertion(+) diff --git a/kitty/lineops.h b/kitty/lineops.h index e38d72e52..545fb0a20 100644 --- a/kitty/lineops.h +++ b/kitty/lineops.h @@ -37,6 +37,7 @@ xlimit_for_line(Line *line) { index_type xlimit = line->xnum; if (BLANK_CHAR == 0) { while (xlimit > 0 && (line->cpu_cells[xlimit - 1].ch) == BLANK_CHAR) xlimit--; + if ((line->gpu_cells[xlimit > 0 ? xlimit - 1 : xlimit].attrs & WIDTH_MASK) == 2) xlimit++; } return xlimit; }