summaryrefslogtreecommitdiff
path: root/src/ui/inputwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-06-08 18:13:18 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-06-08 18:13:18 +0300
commit0153e4dc294edcb52ef6579e38fdc5f6ae713b2d (patch)
tree2b79b4fc47f23eef7029d481a4ccd3833705ed7a /src/ui/inputwidget.c
parenta30a7d287b25c15c8f4413bcfb4979d42c215218 (diff)
Normalize (NFC) document/input field content
The text renderer has problems with composites so normalizing the text (using Unicode normalization form C) yields better results for now.
Diffstat (limited to 'src/ui/inputwidget.c')
-rw-r--r--src/ui/inputwidget.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c
index 0dc5ffcb..32fb5ccb 100644
--- a/src/ui/inputwidget.c
+++ b/src/ui/inputwidget.c
@@ -547,7 +547,9 @@ void setText_InputWidget(iInputWidget *d, const iString *text) {
547 } 547 }
548 clearUndo_InputWidget_(d); 548 clearUndo_InputWidget_(d);
549 clear_Array(&d->text); 549 clear_Array(&d->text);
550 iConstForEach(String, i, text) { 550 iString *nfcText = collect_String(copy_String(text));
551 normalize_String(nfcText);
552 iConstForEach(String, i, nfcText) {
551 pushBack_Array(&d->text, &i.value); 553 pushBack_Array(&d->text, &i.value);
552 } 554 }
553 if (isFocused_Widget(d)) { 555 if (isFocused_Widget(d)) {