[hackers] [surf][PATCH] Fix title handling and the "http:///~" bug

From: Ivan Tham <pickfire_AT_riseup.net>
Date: Wed, 2 Dec 2015 10:09:53 +0800

    1. file:/// stay the same when you navigate
    2. Fix "http://~" to "file://~" in home dir
    3. Expands "file://~" to "file://home/user"

Thanks to quinq for fixing the issue #1 in commit 934705c in surf2.
---
 surf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/surf.c b/surf.c
index ae92188..a3f4b6c 100644
--- a/surf.c
+++ b/surf.c
_AT_@ -802,6 +802,7 @@ loadstatuschange(WebKitWebView *view, GParamSpec *pspec, Client *c)
 			               & SOUP_MESSAGE_CERTIFICATE_TRUSTED);
 		}
 		setatom(c, AtomUri, uri);
+		c->title = copystr(&c->title, uri);
 
 		if (enablestyle)
 			setstyle(c, getstyle(uri));
_AT_@ -848,7 +849,6 @@ loaduri(Client *c, const Arg *arg)
 	} else {
 		webkit_web_view_load_uri(c->view, u);
 		c->progress = 0;
-		c->title = copystr(&c->title, u);
 		updatetitle(c);
 	}
 	g_free(u);
-- 
2.6.2
Received on Wed Dec 02 2015 - 03:09:53 CET

This archive was generated by hypermail 2.3.0 : Wed Dec 02 2015 - 03:12:17 CET