1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-03 00:45:46 +01:00

moved updating of statusline from toggle-> add/remove

This commit is contained in:
Martin Stubenschrott
2007-11-20 13:04:55 +00:00
parent b4dc32470d
commit 6003d130c4

View File

@@ -118,7 +118,7 @@ vimperator.Bookmarks = function () //{{{
load(); load();
// if no protocol specified, default to http://, isn't there a better way? // if no protocol specified, default to http://, isn't there a better way?
if (!/^\w+:/.test(url)) if (!/^[\w-]+:/.test(url))
url = "http://" + url; url = "http://" + url;
try try
@@ -143,6 +143,9 @@ vimperator.Bookmarks = function () //{{{
return false; return false;
} }
// update the display of our "bookmarked" symbol
vimperator.statusline.updateUrl();
//also update bookmark cache //also update bookmark cache
bookmarks.unshift([url, title, keyword, tags || []]); bookmarks.unshift([url, title, keyword, tags || []]);
return true; return true;
@@ -167,9 +170,6 @@ vimperator.Bookmarks = function () //{{{
this.add(title, url); this.add(title, url);
vimperator.commandline.echo("Added bookmark: " + url + extra, vimperator.commandline.HL_NORMAL, vimperator.commandline.FORCE_SINGLELINE); vimperator.commandline.echo("Added bookmark: " + url + extra, vimperator.commandline.HL_NORMAL, vimperator.commandline.FORCE_SINGLELINE);
} }
// update the display of our "bookmarked" symbol
vimperator.statusline.updateUrl();
}, },
isBookmarked: function(url) isBookmarked: function(url)
@@ -212,6 +212,9 @@ vimperator.Bookmarks = function () //{{{
if (count.value > 0) if (count.value > 0)
load(); load();
// update the display of our "bookmarked" symbol
vimperator.statusline.updateUrl();
return count.value; return count.value;
}, },