mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
vt: don’t force cols=2 when we see an emoji variant selector
Fish appears to be the only shell expecting this. The rest probably just does wcswidth(), like usual.
This commit is contained in:
parent
0a9531ac6c
commit
6c70cd9366
1 changed files with 3 additions and 1 deletions
4
vt.c
4
vt.c
|
|
@ -733,10 +733,12 @@ action_utf8_print(struct terminal *term, wchar_t wc)
|
||||||
if (term->composed_count < CELL_COMB_CHARS_HI) {
|
if (term->composed_count < CELL_COMB_CHARS_HI) {
|
||||||
/* TODO: grapheme cluster width */
|
/* TODO: grapheme cluster width */
|
||||||
int grapheme_width = wcswidth(new_cc.chars, new_cc.count);
|
int grapheme_width = wcswidth(new_cc.chars, new_cc.count);
|
||||||
|
#if 0 /* Fish expects this, but nothing else */
|
||||||
if (new_cc.chars[new_cc.count - 1] == 0xfe0f) {
|
if (new_cc.chars[new_cc.count - 1] == 0xfe0f) {
|
||||||
/* Emoji selector */
|
/* Emoji selector */
|
||||||
grapheme_width = 2;
|
grapheme_width = max(2, grapheme_width);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
new_cc.width = grapheme_width;
|
new_cc.width = grapheme_width;
|
||||||
|
|
||||||
term->composed_count++;
|
term->composed_count++;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue