summaryrefslogtreecommitdiff
path: root/src/ui/inputwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-18 14:06:18 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-18 14:06:18 +0300
commitd85be5627478949876a5bb10d9d4152ac75a07b9 (patch)
treef21bf20bb2fcf5d03ea9bef91c12282e321260f5 /src/ui/inputwidget.c
parent6bad5bc26bd472dc79158cc76fa32fa85b633926 (diff)
InputWidget: Update cursor position when text changes
Diffstat (limited to 'src/ui/inputwidget.c')
-rw-r--r--src/ui/inputwidget.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c
index 320f21ce..2d6d84dd 100644
--- a/src/ui/inputwidget.c
+++ b/src/ui/inputwidget.c
@@ -182,6 +182,7 @@ void setText_InputWidget(iInputWidget *d, const iString *text) {
182 pushBack_Array(&d->text, &i.value); 182 pushBack_Array(&d->text, &i.value);
183 } 183 }
184 iZap(d->mark); 184 iZap(d->mark);
185 d->cursor = iMin(d->cursor, size_Array(&d->text));
185 refresh_Widget(as_Widget(d)); 186 refresh_Widget(as_Widget(d));
186} 187}
187 188