summaryrefslogtreecommitdiff
path: root/src/ui/inputwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-05-19 11:25:26 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-05-19 11:25:26 +0300
commitd5cf10db60a613db48d74426ceec9b12ffd54ce2 (patch)
tree95a6add83bb9be5e4ef5bbf1231002b6683cf53d /src/ui/inputwidget.c
parentba425fa4038580fa71bb944e55fedb04238d7197 (diff)
Mobile: InputWidget Return key vs. maxLen
Only unlimited-length input should allow line breaks with the Return key.
Diffstat (limited to 'src/ui/inputwidget.c')
-rw-r--r--src/ui/inputwidget.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c
index 64fd2ed0..0dc5ffcb 100644
--- a/src/ui/inputwidget.c
+++ b/src/ui/inputwidget.c
@@ -1162,7 +1162,8 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) {
1162 return iTrue; 1162 return iTrue;
1163 case SDLK_RETURN: 1163 case SDLK_RETURN:
1164 case SDLK_KP_ENTER: 1164 case SDLK_KP_ENTER:
1165 if (mods == KMOD_SHIFT || (~d->inFlags & isUrl_InputWidgetFlag && 1165 if (mods == KMOD_SHIFT || (d->maxLen == 0 &&
1166 ~d->inFlags & isUrl_InputWidgetFlag &&
1166 deviceType_App() != desktop_AppDeviceType)) { 1167 deviceType_App() != desktop_AppDeviceType)) {
1167 pushUndo_InputWidget_(d); 1168 pushUndo_InputWidget_(d);
1168 deleteMarked_InputWidget_(d); 1169 deleteMarked_InputWidget_(d);