From 8f162eb1b9cd2ec80c10cc339c83705933a82d32 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Sun, 23 Dec 2012 23:36:09 +0100 Subject: [PATCH] Allow to use count for the browser history. Now it's possible to go multiply step back or forward in the history by :[n]back or :[n]forward and also via keybindings. --- src/command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/command.c b/src/command.c index edcf92a..60f5ace 100644 --- a/src/command.c +++ b/src/command.c @@ -162,9 +162,9 @@ gboolean command_view_source(const Arg* arg) gboolean command_navigate(const Arg* arg) { if (arg->i <= VP_NAVIG_FORWARD) { - /* TODO allow to set a count for the navigation */ + gint count = vp.state.count ? vp.state.count : 1; webkit_web_view_go_back_or_forward( - vp.gui.webview, (arg->i == VP_NAVIG_BACK ? -1 : 1) + vp.gui.webview, (arg->i == VP_NAVIG_BACK ? -count : count) ); } else if (arg->i == VP_NAVIG_RELOAD) { webkit_web_view_reload(vp.gui.webview); -- 2.20.1