From: Armaan Bhojwani Date: Thu, 10 Jun 2021 22:45:45 +0000 (-0400) Subject: Don't automatically search forwards X-Git-Tag: v1.0.0~4 X-Git-Url: https://git.armaanb.net/?p=chorizo.git;a=commitdiff_plain;h=232df78291682010612714ac12810e37288b95be Don't automatically search forwards --- diff --git a/src/browser.c b/src/browser.c index e1dd0c4..72104f2 100644 --- a/src/browser.c +++ b/src/browser.c @@ -860,11 +860,12 @@ search_init(struct Client *c, int direction) { const gchar *contents = gtk_entry_get_text(GTK_ENTRY(c->location)); if (strcspn(contents, "s/")) { gtk_entry_set_text(GTK_ENTRY(c->location), "s/"); + gtk_editable_set_position(GTK_EDITABLE(c->location), -1); + } else { + search(c, 0); + search(c, -1); + search(c, direction); } - gtk_editable_set_position(GTK_EDITABLE(c->location), -1); - search(c, 0); - search(c, -1); - search(c, direction); } int