From c1c0f11821e36e96add5060916d83533308b4126 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Mon, 22 Nov 2021 23:02:25 +0100 Subject: config: add tweak.grapheme-width-method=max MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ‘max’ is a new value for ‘tweak.grapheme-width-method’. When enabled, the width of a grapheme cluster is that of the cluster’s widest codepoint. --- vt.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vt.c') diff --git a/vt.c b/vt.c index 687be912..736a2cfd 100644 --- a/vt.c +++ b/vt.c @@ -792,6 +792,10 @@ action_utf8_print(struct terminal *term, wchar_t wc) composed != NULL ? composed->width : base_width; switch (term->conf->tweak.grapheme_width_method) { + case GRAPHEME_WIDTH_MAX: + new_cc->width = max(grapheme_width, width); + break; + case GRAPHEME_WIDTH_DOUBLE: if (unlikely(wc == 0xfe0f)) width = 2; -- cgit v1.3