From: Daniel Carl <danielcarl@gmx.de>
Date: Mon, 10 Apr 2017 11:35:40 +0000 (+0200)
Subject: Write url to history on load finished.
X-Git-Url: https://git.owens.tech/112-editable-focus.html/112-editable-focus.html/git?a=commitdiff_plain;h=2b6aeb694e8dca5da0ef52b2f44db12954cd0dcb;p=vimb.git

Write url to history on load finished.
---

diff --git a/src/main.c b/src/main.c
index 0166419..65b188e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -33,6 +33,7 @@
 #include "ex.h"
 #include "ext-proxy.h"
 #include "handler.h"
+#include "history.h"
 #include "input.h"
 #include "js.h"
 #include "main.h"
@@ -1123,7 +1124,11 @@ static void on_webview_load_changed(WebKitWebView *webview,
             break;
 
         case WEBKIT_LOAD_FINISHED:
+            uri = webkit_web_view_get_uri(webview);
             c->state.progress = 100;
+            if (strncmp(uri, "about:", 6)) {
+                history_add(c, HISTORY_URL, uri, webkit_web_view_get_title(webview));
+            }
             break;
     }
 }