aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2026-06-12 13:34:12 +0000
committerDaniel Eklöf <daniel@ekloef.se>2026-06-12 13:54:45 +0000
commitd7742d031276a19160dc9317ff6fb5aac861d853 (patch)
tree15b842df0c3bdced5705150653ef046e671efefc /terminal.h
parentFix #2377: DECCRA: swapped row-bounds check dropping multi-row copies (diff)
term: do not allow codepoint merging into grapheme clusters directly after a cursor move
That is, only do grapheme clustering when printing codepoints in sequence, without any cursor movements in between. Closes #2383
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/terminal.h b/terminal.h
index 446d5f23..7e95697e 100644
--- a/terminal.h
+++ b/terminal.h
@@ -264,6 +264,7 @@ struct vt {
char32_t last_printed;
#if defined(FOOT_GRAPHEME_CLUSTERING)
utf8proc_int32_t grapheme_state;
+ bool codepoint_merging_ok;
#endif
char32_t utf8;
struct {
@@ -994,5 +995,6 @@ static inline void term_reset_grapheme_state(struct terminal *term)
{
#if defined(FOOT_GRAPHEME_CLUSTERING)
term->vt.grapheme_state = 0;
+ term->vt.codepoint_merging_ok = false;
#endif
}