From 4eef001d5855b9b5afb59bbd3b92b3a2828fcca0 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 20 Sep 2023 13:45:06 +0200 Subject: csi: implement DECSET/DECRST/DECRQM 2027 - grapheme cluster processing This implements private mode 2027 - grapheme cluster processing, as defined in the "Terminal Unicode Core"[1] specification. Internally, we just flip the already existing option "grapheme shaping". Since it's now runtime changeable, we need a copy of it in the terminal struct, rather than referencing the conf object. [1]: https://github.com/contour-terminal/terminal-unicode-core/blob/13fc5a8993a033ff10c1f3433d08cb618cde4ac2/spec/terminal-unicode-core.tex#L50-L53 --- terminal.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'terminal.c') diff --git a/terminal.c b/terminal.c index f19da873..1b082100 100644 --- a/terminal.c +++ b/terminal.c @@ -1253,6 +1253,7 @@ term_init(const struct config *conf, struct fdm *fdm, struct reaper *reaper, }, .foot_exe = xstrdup(foot_exe), .cwd = xstrdup(cwd), + .grapheme_shaping = conf->tweak.grapheme_shaping, #if defined(FOOT_IME_ENABLED) && FOOT_IME_ENABLED .ime_enabled = true, #endif @@ -1903,6 +1904,8 @@ term_reset(struct terminal *term, bool hard) tll_remove(term->alt.sixel_images, it); } + term->grapheme_shaping = term->conf->tweak.grapheme_shaping; + #if defined(FOOT_IME_ENABLED) && FOOT_IME_ENABLED term_ime_enable(term); #endif -- cgit v1.3