From 46f8507c9cdb6223df161b0db1cb1df2cabc070c Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sun, 14 Oct 2007 22:39:08 +0000 Subject: [PATCH] [+] marker in the statusline --- NEWS | 1 + content/ui.js | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index f5e69650..55362cdf 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@
 2007-XX-XX:
 	* version 0.5.3
+	* [+], [-] and [+-] in the statusline, whether we can go back, forward, or both
 	* :set showtabline now finally works as expected for all values
 
 2007-10-11:
diff --git a/content/ui.js b/content/ui.js
index a97293e4..b687e4b2 100644
--- a/content/ui.js
+++ b/content/ui.js
@@ -1069,10 +1069,16 @@ function StatusLine() //{{{
         status_bar.setAttribute("class", "chromeclass-status " + highlight_group);
     };
 
+    // if "url" is ommited, build a usable string for the URL
     this.updateUrl = function(url)
     {
-        if (!url || typeof url != "string")
-            url = vimperator.buffer.URL;
+        if (typeof url == "string")
+        {
+            url_widget.value = url;
+            return;
+        }
+
+        url = vimperator.buffer.URL;
 
         // make it even more vim-like
         if (url == "about:blank")
@@ -1085,6 +1091,16 @@ function StatusLine() //{{{
                 url = "[No Name]";
         }
 
+        var sh = getWebNavigation().sessionHistory;
+        var modified = "";
+        if (sh.index > 0)
+            modified += "+";
+        if (sh.index < sh.count -1)
+            modified += "-";
+
+        if (modified)
+            url += " [" + modified + "]"
+
         url_widget.value = url;
     };