From b9ef703eb14ba2357b847b62a715b4e97f690209 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 20 Aug 2020 19:25:35 +0200 Subject: wip: grapheme shaping --- selection.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'selection.c') diff --git a/selection.c b/selection.c index 555b32f2..cafb161e 100644 --- a/selection.c +++ b/selection.c @@ -249,7 +249,7 @@ selection_find_word_boundary_left(struct terminal *term, struct coord *pos, if (c >= CELL_COMB_CHARS_LO && c < (CELL_COMB_CHARS_LO + term->composed_count)) { - c = term->composed[c - CELL_COMB_CHARS_LO].base; + c = term->composed[c - CELL_COMB_CHARS_LO].chars[0]; } bool initial_is_space = c == 0 || iswspace(c); @@ -289,7 +289,7 @@ selection_find_word_boundary_left(struct terminal *term, struct coord *pos, if (c >= CELL_COMB_CHARS_LO && c < (CELL_COMB_CHARS_LO + term->composed_count)) { - c = term->composed[c - CELL_COMB_CHARS_LO].base; + c = term->composed[c - CELL_COMB_CHARS_LO].chars[0]; } bool is_space = c == 0 || iswspace(c); @@ -328,7 +328,7 @@ selection_find_word_boundary_right(struct terminal *term, struct coord *pos, if (c >= CELL_COMB_CHARS_LO && c < (CELL_COMB_CHARS_LO + term->composed_count)) { - c = term->composed[c - CELL_COMB_CHARS_LO].base; + c = term->composed[c - CELL_COMB_CHARS_LO].chars[0]; } bool initial_is_space = c == 0 || iswspace(c); @@ -370,7 +370,7 @@ selection_find_word_boundary_right(struct terminal *term, struct coord *pos, if (c >= CELL_COMB_CHARS_LO && c < (CELL_COMB_CHARS_LO + term->composed_count)) { - c = term->composed[c - CELL_COMB_CHARS_LO].base; + c = term->composed[c - CELL_COMB_CHARS_LO].chars[0]; } bool is_space = c == 0 || iswspace(c); -- cgit v1.3