summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--surf.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/surf.c b/surf.c
index 796ee96..62b4948 100644
--- a/surf.c
+++ b/surf.c
@@ -435,14 +435,23 @@ void
loaduri(Client *c, const Arg *arg) {
char *u;
const char *uri = (char *)arg->v;
+ Arg a = { .b = FALSE };
+ if(strcmp(uri, "") == 0)
+ return;
u = g_strrstr(uri, "://") ? g_strdup(uri)
: g_strdup_printf("http://%s", uri);
- webkit_web_view_load_uri(c->view, u);
- c->progress = 0;
- c->title = copystr(&c->title, u);
- g_free(u);
- update(c);
+ /* prevents endless loop */
+ if(c->uri && strcmp(u, c->uri) == 0) {
+ reload(c, &a);
+ }
+ else {
+ webkit_web_view_load_uri(c->view, u);
+ c->progress = 0;
+ c->title = copystr(&c->title, u);
+ g_free(u);
+ update(c);
+ }
}
void
@@ -551,6 +560,7 @@ newclient(void) {
g_object_set(G_OBJECT(settings), "user-stylesheet-uri", uri, NULL);
g_free(uri);
setatom(c, findprop, "");
+ setatom(c, uriprop, "");
c->download = NULL;
c->title = NULL;
/td> 2009-06-08allow all modifiers.Gravatar Enno Boland (Gottox) 1-1/+1 2009-06-08Fixing keybindings when numlock is enabled.Gravatar Enno Boland (Gottox) 1-1/+1 2009-06-08Get rid of these gotos.Gravatar Enno Boland (Gottox) 1-12/+12 2009-06-08adding zoom support.Gravatar Enno Boland (Gottox) 1-1/+12 2009-06-08some cleanups.Gravatar Enno Boland (Gottox) 1-2/+2 2009-06-08better download handling.Gravatar Enno Boland (Gottox) 2-63/+89 2009-06-08renamed download handlers.Gravatar Enno Boland (Gottox) 1-7/+7 2009-06-08merged, now has download bar, other misc fixesGravatar Thomas Menari 3-23/+57 2009-06-08adding surf-directory.Gravatar Enno Boland (Gottox) 1-1/+2 2009-06-08use tabs not spaces!Gravatar Enno Boland (Gottox) 1-8/+8 2009-06-08Backed out changeset ed121082f103Gravatar Enno Boland (Gottox) 1-11/+1 unable to use textfields now. Please implement it in a sane way.