From: Daniel Carl Date: Thu, 25 Jul 2013 09:37:58 +0000 (+0200) Subject: Don't try to search multiple time for none found string. X-Git-Url: https://git.owens.tech///git?a=commitdiff_plain;h=104e2480542dcf197367956832392b4b475817e9;p=vimb.git Don't try to search multiple time for none found string. --- diff --git a/src/command.c b/src/command.c index 9d761da..466a2e5 100644 --- a/src/command.c +++ b/src/command.c @@ -593,7 +593,9 @@ gboolean command_search(const Arg *arg) /* make sure we have a count greater than 0 */ vb.state.count = vb.state.count ? vb.state.count : 1; do { - webkit_web_view_search_text(vb.gui.webview, vb.state.search_query, false, forward, true); + if (!webkit_web_view_search_text(vb.gui.webview, vb.state.search_query, false, forward, true)) { + break; + } } while (--vb.state.count); }