~sircmpwn/gmni

bf7975dd44fbf5a28a00c14b0e661578cff35e56 — OndÅ™ej Fiala 2 years ago eb5c547
gmnlm: save non-sensitive input requests in history

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.
1 files changed, 3 insertions(+), 1 deletions(-)

M src/gmnlm.c
M src/gmnlm.c => src/gmnlm.c +3 -1
@@ 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: