From 22884392a24d00b3f2320359eaefa41e03c5b9c3 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 14 Aug 2008 10:17:25 +0000 Subject: [PATCH] return an error message if the URL arg to :back and :forward doesn't match rather than just going back/forward one step in the history anyway --- content/bookmarks.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/content/bookmarks.js b/content/bookmarks.js index faf3a045..2bbdbf0a 100644 --- a/content/bookmarks.js +++ b/content/bookmarks.js @@ -552,7 +552,9 @@ liberator.History = function () //{{{ function (args, special, count) { if (special) + { liberator.history.goToStart(); + } else { if (args) @@ -566,8 +568,12 @@ liberator.History = function () //{{{ return; } } + liberator.echoerr("Exxx: URL not found in history"); + } + else + { + liberator.history.stepTo(count > 0 ? -1 * count : -1); } - liberator.history.stepTo(count > 0 ? -1 * count : -1); } }, { @@ -592,7 +598,9 @@ liberator.History = function () //{{{ function (args, special, count) { if (special) + { liberator.history.goToEnd(); + } else { if (args) @@ -606,8 +614,12 @@ liberator.History = function () //{{{ return; } } + liberator.echoerr("Exxx: URL not found in history"); + } + else + { + liberator.history.stepTo(count > 0 ? count : 1); } - liberator.history.stepTo(count > 0 ? count : 1); } }, {