~sircmpwn/gmni-devel

gmni: gmnlm: save non-sensitive input requests in history v1 APPLIED

Ondřej Fiala: 1
 gmnlm: save non-sensitive input requests in history

 1 files changed, 3 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/gmni-devel/patches/33183/mbox | git am -3
Learn more about email & git

[PATCH gmni] gmnlm: save non-sensitive input requests in history Export this patch

Currently, followup requests to both INPUT and SENSITIVE INPUT responses are
omitted from history. However, the intended use of INPUT is for searching, and
there is SENSITIVE INPUT for sensitive information, so omitting regular INPUT
from history doesn't make much sense and only makes searching annoying as one
needs to re-enter the query when going back.
---
 src/gmnlm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gmnlm.c b/src/gmnlm.c
index b79bb32..9e7b527 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
@@ -480,7 +480,9 @@ do_requests(struct browser *browser, struct gemini_response *resp)
				browser->plain_url, input);
			free(input);
			assert(new_url);
			set_url(browser, new_url, NULL);
			set_url(browser, new_url,
				resp->status == GEMINI_STATUS_SENSITIVE_INPUT ?
				NULL : &browser->history);
			free(new_url);
			break;
		case GEMINI_STATUS_CLASS_REDIRECT:
-- 
2.36.1
Thanks!

To git@git.sr.ht:~sircmpwn/gmni
   eb5c547..bf7975d  master -> master