mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Add an option variation-selector-always-wide to instruct tmux not to
always interpret VS16 as a wide character and assume the terminal does likewise. This is behaviour seen in a number of newer terminals' Unicode 14 support but not in older terminals; it seems to be a little contentious and is currently difficult to detect. Probably in the long run tmux should pick a behaviour, look at a (new) terminfo(5) capability to tell it what the terminal will do, and emulate as required, but at this point I'm not sure that is worth it for something where support is mixed, seems to be in flux, and that mostly only matters for emojis. GitHub issues 3923 and 4475 and others before that.
This commit is contained in:
@ -2010,9 +2010,11 @@ screen_write_combine(struct screen_write_ctx *ctx, const struct grid_cell *gc)
|
||||
*/
|
||||
if (utf8_is_zwj(ud))
|
||||
zero_width = 1;
|
||||
else if (utf8_is_vs(ud))
|
||||
zero_width = force_wide = 1;
|
||||
else if (ud->width == 0)
|
||||
else if (utf8_is_vs(ud)) {
|
||||
zero_width = 1;
|
||||
if (options_get_number(global_options, "variation-selector-always-wide"))
|
||||
force_wide = 1;
|
||||
} else if (ud->width == 0)
|
||||
zero_width = 1;
|
||||
|
||||
/* Cannot combine empty character or at left. */
|
||||
|
Reference in New Issue
Block a user