if (arg->i == 0) {
#ifdef FEATURE_SEARCH_HIGHLIGHT
webkit_web_view_unmark_text_matches(vb.gui.webview);
+ vb.state.search_matches = 0;
+ vb_update_statusbar();
#endif
newsearch = true;
return true;
/* highlight matches if the search is started new or continued
* after switch to normal mode which calls this function with
* COMMAND_SEARCH_OFF */
- webkit_web_view_mark_text_matches(vb.gui.webview, query, false, 0);
+ vb.state.search_matches = webkit_web_view_mark_text_matches(vb.gui.webview, query, false, 0);
webkit_web_view_set_highlight_text_matches(vb.gui.webview, true);
+ vb_update_statusbar();
#endif
-
newsearch = false;
/* skip first search because this is done during typing in ex
* mode, else the search will mark the next match as active */
g_string_append_printf(status, " %d %s", num, num == 1 ? "download" : "downloads");
}
+#ifdef FEATURE_SEARCH_HIGHLIGHT
+ /* show the number of matches search results */
+ if (vb.state.search_matches) {
+ g_string_append_printf(status, " (%d)", vb.state.search_matches);
+ }
+#endif
+
/* show load status of page or the downloads */
if (vb.state.progress != 100) {
#ifdef FEATURE_WGET_PROGRESS_BAR
char *reg[VB_REG_SIZE]; /* holds the yank buffer */
gboolean enable_register; /* indicates if registers are filled */
gboolean enable_history; /* indicates if history entries are written */
+#ifdef FEATURE_SEARCH_HIGHLIGHT
+ int search_matches; /* number of matches search results */
+#endif
} State;
typedef struct {