summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-11-18 15:28:50 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-11-18 15:28:50 +0200
commitbd3262d5febad0409a875f1eda30b7d1150c9ac8 (patch)
treeda2dedf4fa06b7c64bb24882a0b7fc78b356dea9 /src/ui
parent9134e4e9f8707b72286a3fac5a82092d99eb27c7 (diff)
Ignore whitespace around user-entered URL
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/window.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 4418e61f..7cc035f5 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -241,9 +241,11 @@ static iBool handleNavBarCommands_(iWidget *navBar, const char *cmd) {
241 } 241 }
242 if (arg_Command(cmd) && argLabel_Command(cmd, "enter") && 242 if (arg_Command(cmd) && argLabel_Command(cmd, "enter") &&
243 !isFocused_Widget(findWidget_App("lookup"))) { 243 !isFocused_Widget(findWidget_App("lookup"))) {
244 iString *newUrl = copy_String(text_InputWidget(url));
245 trim_String(newUrl);
244 postCommandf_App( 246 postCommandf_App(
245 "open url:%s", 247 "open url:%s",
246 cstr_String(absoluteUrl_String(&iStringLiteral(""), text_InputWidget(url)))); 248 cstr_String(absoluteUrl_String(&iStringLiteral(""), collect_String(newUrl))));
247 return iTrue; 249 return iTrue;
248 } 250 }
249 } 251 }