aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-09-20 11:45:06 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-09-25 14:50:44 +0000
commit4eef001d5855b9b5afb59bbd3b92b3a2828fcca0 (patch)
treeb82c167fdd088f7c7a5d7595f2e77de8e16bf128 /terminal.c
parentdcs: xtgettcap: ignore queries with invalid hex encodings (diff)
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
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c3
1 files changed, 3 insertions, 0 deletions
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