From: Daniel Carl Date: Sun, 23 Dec 2012 22:36:09 +0000 (+0100) Subject: Allow to use count for the browser history. X-Git-Url: https://git.owens.tech/dummy.html/dummy.html/git?a=commitdiff_plain;h=8f162eb1b9cd2ec80c10cc339c83705933a82d32;p=vimb.git 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. --- 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);