summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gmutil.c3
-rw-r--r--src/ui/documentwidget.c13
2 files changed, 14 insertions, 2 deletions
diff --git a/src/gmutil.c b/src/gmutil.c
index b984950e..ce1b68c7 100644
--- a/src/gmutil.c
+++ b/src/gmutil.c
@@ -258,6 +258,9 @@ iRangecc urlRoot_String(const iString *d) {
258 else { 258 else {
259 iUrl parts; 259 iUrl parts;
260 init_Url(&parts, d); 260 init_Url(&parts, d);
261 if (equalCase_Rangecc(parts.scheme, "about")) {
262 return (iRangecc){ constBegin_String(d), parts.path.start };
263 }
261 rootEnd = parts.path.start; 264 rootEnd = parts.path.start;
262 } 265 }
263 return (iRangecc){ constBegin_String(d), rootEnd }; 266 return (iRangecc){ constBegin_String(d), rootEnd };
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 86513368..67fca410 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -4325,6 +4325,9 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)
4325 set_String(parentUrl, withScheme_String(parentUrl, "gemini")); 4325 set_String(parentUrl, withScheme_String(parentUrl, "gemini"));
4326 stripUrlPort_String(parentUrl); 4326 stripUrlPort_String(parentUrl);
4327 } 4327 }
4328 if (!cmpCase_String(parentUrl, "about:")) {
4329 setCStr_String(parentUrl, "about:about");
4330 }
4328 postCommandf_Root(w->root, "open url:%s", cstr_String(parentUrl)); 4331 postCommandf_Root(w->root, "open url:%s", cstr_String(parentUrl));
4329 } 4332 }
4330 return iTrue; 4333 return iTrue;
@@ -4339,8 +4342,14 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)
4339 but let's try anyway. */ 4342 but let's try anyway. */
4340 set_String(rootUrl, withScheme_String(rootUrl, "gemini")); 4343 set_String(rootUrl, withScheme_String(rootUrl, "gemini"));
4341 stripUrlPort_String(rootUrl); 4344 stripUrlPort_String(rootUrl);
4342 } 4345 }
4343 postCommandf_Root(w->root, "open url:%s/", cstr_String(rootUrl)); 4346 if (!cmpCase_String(rootUrl, "about:")) {
4347 setCStr_String(rootUrl, "about:about");
4348 }
4349 else {
4350 appendCStr_String(rootUrl, "/");
4351 }
4352 postCommandf_Root(w->root, "open url:%s", cstr_String(rootUrl));
4344 return iTrue; 4353 return iTrue;
4345 } 4354 }
4346 else if (equalWidget_Command(cmd, w, "scroll.moved")) { 4355 else if (equalWidget_Command(cmd, w, "scroll.moved")) {