=> fad76a45f72b161680db4b33660e20645afefaba
[1mdiff --git a/src/app.c b/src/app.c[m [1mindex e317e4c6..ef120749 100644[m [1m--- a/src/app.c[m [1m+++ b/src/app.c[m [36m@@ -2272,7 +2272,7 @@[m [mstatic iBool handlePrefsCommands_(iWidget *d, const char *cmd) {[m updateFontButton_(findChild_Widget(d, "prefs.font.monodoc"), string_Command(cmd, "monodoc"));[m return iFalse;[m }[m [31m- else if (startsWith_CStr(cmd, "input.ended id:prefs.linespacing")) {[m [32m+[m[32m else if (equalArg_Command(cmd, "input.ended", "id", "prefs.linespacing")) {[m /* Apply line spacing changes immediately. */[m const iInputWidget *lineSpacing = findWidget_App("prefs.linespacing");[m postCommandf_App("linespacing.set arg:%f", toFloat_String(text_InputWidget(lineSpacing)));[m [1mdiff --git a/src/ui/bindingswidget.c b/src/ui/bindingswidget.c[m [1mindex 13f9434e..4365fb1e 100644[m [1m--- a/src/ui/bindingswidget.c[m [1m+++ b/src/ui/bindingswidget.c[m [36m@@ -183,7 +183,7 @@[m [mstatic iBool processEvent_BindingsWidget_(iBindingsWidget *d, const SDL_Event *e[m postCommand_App("bindings.changed");[m return iTrue;[m }[m [31m- else if (startsWith_CStr(cmd, "tabs.changed id:bindings")) {[m [32m+[m[32m else if (equalArg_Command(cmd, "tabs.changed", "id", "bindings")) {[m /* Force the scrollbar to unfade. The list is created hidden so the scrollbar is not[m shown by default.*/[m updateVisible_ListWidget(d->list);[m [1mdiff --git a/src/ui/command.c b/src/ui/command.c[m [1mindex a4868ca9..307fd44c 100644[m [1m--- a/src/ui/command.c[m [1m+++ b/src/ui/command.c[m [36m@@ -61,6 +61,12 @@[m [miBool equal_Command(const char *cmdWithArgs, const char *cmd) {[m return equal_CStr(cmdWithArgs, cmd);[m }[m [m [32m+[m[32miBool equalArg_Command(const char *commandWithArgs, const char *command, const char *label,[m [32m+[m[32m const char *value) {[m [32m+[m[32m return equal_Command(commandWithArgs, command) &&[m [32m+[m[32m equal_Rangecc(range_Command(commandWithArgs, label), value);[m [32m+[m[32m}[m [32m+[m int argLabel_Command(const char *cmd, const char *label) {[m iToken tok;[m init_Token(&tok, label);[m [1mdiff --git a/src/ui/command.h b/src/ui/command.h[m [1mindex 8dcae892..5f85250a 100644[m [1m--- a/src/ui/command.h[m [1m+++ b/src/ui/command.h[m [36m@@ -27,6 +27,8 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m #include[m [m iBool equal_Command (const char *commandWithArgs, const char *command);[m [32m+[m[32miBool equalArg_Command (const char *commandWithArgs, const char *command,[m [32m+[m[32m const char *label, const char *value);[m [m int arg_Command (const char *); /* arg: */[m float argf_Command (const char *); /* arg: */[m [1mdiff --git a/src/ui/lookupwidget.c b/src/ui/lookupwidget.c[m [1mindex 4ace1a30..e14b43a9 100644[m [1m--- a/src/ui/lookupwidget.c[m [1m+++ b/src/ui/lookupwidget.c[m [36m@@ -710,7 +710,7 @@[m [mstatic iBool processEvent_LookupWidget_(iLookupWidget *d, const SDL_Event *ev) {[m updateVisible_ListWidget(d->list);[m invalidate_ListWidget(d->list);[m }[m [31m- if (startsWith_CStr(cmd, "input.ended id:url ") &&[m [32m+[m[32m if (equalArg_Command(cmd, "input.ended", "id", "url") &&[m (deviceType_App() != desktop_AppDeviceType || !isFocused_Widget(w))) {[m showCollapsed_Widget(w, iFalse);[m }[m [1mdiff --git a/src/ui/root.c b/src/ui/root.c[m [1mindex d7d7c32f..a5177558 100644[m [1m--- a/src/ui/root.c[m [1m+++ b/src/ui/root.c[m [36m@@ -990,7 +990,7 @@[m [mstatic iBool handleNavBarCommands_(iWidget *navBar, const char *cmd) {[m return iTrue;[m }[m }[m [31m- else if (startsWith_CStr(cmd, "input.ended id:url ")) {[m [32m+[m[32m else if (equalArg_Command(cmd, "input.ended", "id", "url")) {[m iInputWidget *url = findChild_Widget(navBar, "url");[m showSearchQueryIndicator_(iFalse);[m if (isEmpty_String(text_InputWidget(url))) {[m [36m@@ -1133,8 +1133,7 @@[m [mstatic iBool handleNavBarCommands_(iWidget *navBar, const char *cmd) {[m }[m [m static iBool handleSearchBarCommands_(iWidget *searchBar, const char *cmd) {[m [31m- if (equal_Command(cmd, "input.ended") &&[m [31m- equal_Rangecc(range_Command(cmd, "id"), "find.input")) {[m [32m+[m[32m if (equalArg_Command(cmd, "input.ended", "id", "find.input")) {[m iInputWidget *input = findChild_Widget(searchBar, "find.input");[m if (arg_Command(cmd) && argLabel_Command(cmd, "enter") && isVisible_Widget(input)) {[m postCommand_Root(searchBar->root, "find.next");[m [1mdiff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c[m [1mindex ac4e4081..bed61d18 100644[m [1m--- a/src/ui/sidebarwidget.c[m [1m+++ b/src/ui/sidebarwidget.c[m [36m@@ -1393,7 +1393,8 @@[m [mstatic iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev)[m }[m else if (ev->type == SDL_USEREVENT && ev->user.code == command_UserEventCode) {[m const char *cmd = command_UserEvent(ev);[m [31m- if (startsWith_CStr(cmd, "tabs.changed id:doc") || equal_Command(cmd, "document.changed")) {[m [32m+[m[32m if (equalArg_Command(cmd, "tabs.changed", "id", "doc") ||[m [32m+[m[32m equal_Command(cmd, "document.changed")) {[m updateItems_SidebarWidget_(d);[m scrollOffset_ListWidget(d->list, 0);[m }[m
text/gemini; charset=utf-8
This content has been proxied by September (3851b).