From: Daniel Carl Date: Mon, 1 Jul 2013 18:50:01 +0000 (+0200) Subject: Fixed search starting in wrong direction. X-Git-Url: https://git.owens.tech///git?a=commitdiff_plain;h=9030f9d749b1f2da08dfcecc5bc08a82f0c0d0ce;p=vimb.git Fixed search starting in wrong direction. If the search started, the current search direction wasn't set but the resulting direction was calculated upon this value. This leads the search to start search with the last match found on the page. --- diff --git a/src/command.c b/src/command.c index 286ef3b..1387b47 100644 --- a/src/command.c +++ b/src/command.c @@ -560,7 +560,7 @@ gboolean command_paste(const Arg *arg) gboolean command_search(const Arg *arg) { - gboolean forward = !(arg->i ^ vb.state.search_dir); + gboolean forward; if (arg->i == VB_SEARCH_OFF) { #ifdef FEATURE_SEARCH_HIGHLIGHT @@ -575,6 +575,7 @@ gboolean command_search(const Arg *arg) /* set dearch dir only when the searching is started */ vb.state.search_dir = arg->i; } + forward = !(arg->i ^ vb.state.search_dir); if (vb.state.search_query) { #ifdef FEATURE_SEARCH_HIGHLIGHT