From 73e84e6709adc1774db6ca075dcdc625e7fa31fc Mon Sep 17 00:00:00 2001 From: Julien Blanchard Date: Mon, 11 Jan 2021 15:31:36 +0000 Subject: [PATCH] Add resettitle() --- castor.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/castor.c b/castor.c index 238772c..b4dd2f5 100644 --- a/castor.c +++ b/castor.c @@ -79,6 +79,12 @@ char *menu3[] = { 0 }; +void +resettitle(void) +{ + message("castor9"); +} + Url * current_url(void) { @@ -123,7 +129,7 @@ show(Ctx *c) pldraw(textp, screen); plinitentry(entryp, PACKN|FILLX, 0, c->url->raw, entryhit); pldraw(entryp, screen); - message("castor9"); + resettitle(); } void @@ -391,7 +397,7 @@ gemini_get(Url *url) close(fd); page(url); - message("castor9"); + resettitle(); }else{ while((line = Brdstr(&body, '\n', 0)) != nil){ if(strbeg(line, "=>") == 0){ @@ -470,14 +476,13 @@ gemini_put(Response *r) { char buf[1024]; char *url; + + resettitle(); strncpy(buf, "", sizeof(buf)-1); - if(eenter(r->meta, buf, sizeof(buf), mouse) <= 0){ - message("castor9"); + if(eenter(r->meta, buf, sizeof(buf), mouse) <= 0) return; - } url = smprint("%s?%s", r->url->raw, buf); - message("castor9"); gemini_get(urlparse(nil, url)); } -- 2.45.2