Don't try to search multiple time for none found string.
authorDaniel Carl <danielcarl@gmx.de>
Thu, 25 Jul 2013 09:37:58 +0000 (11:37 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Thu, 25 Jul 2013 09:37:58 +0000 (11:37 +0200)
src/command.c

index 9d761da..466a2e5 100644 (file)
@@ -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);
     }