.B set
Set configuration values.
.TP
-.B search-{forward, backward}
+.IB [N] search-{forward, backward}
Search in current page forward or backward.
.TP
.B inspect
webkit_web_view_mark_text_matches(vp.gui.webview, state->search_query, FALSE, 0);
webkit_web_view_set_highlight_text_matches(vp.gui.webview, TRUE);
#endif
- webkit_web_view_search_text(vp.gui.webview, state->search_query, FALSE, forward, TRUE);
+ /* make sure we have a count greater than 0 */
+ vp.state.count = vp.state.count ? vp.state.count : 1;
+ do {
+ webkit_web_view_search_text(vp.gui.webview, state->search_query, FALSE, forward, TRUE);
+ } while (--vp.state.count);
}
return TRUE;
return TRUE;
}
/* allow mode keys and counts only in normal mode */
- if (VP_MODE_NORMAL == vp.state.mode) {
+ if ((VP_MODE_SEARCH | VP_MODE_NORMAL) & vp.state.mode) {
if (vp.state.modkey == 0 && ((keyval >= GDK_1 && keyval <= GDK_9)
|| (keyval == GDK_0 && vp.state.count))) {
/* append the new entered count to previous one */
gtk_widget_grab_focus(GTK_WIDGET(vp.gui.webview));
break;
- case VP_MODE_SEARCH:
- break;
-
case VP_MODE_COMMAND:
case VP_MODE_HINTING:
gtk_widget_grab_focus(GTK_WIDGET(vp.gui.inputbox));
/* behaviour */
typedef struct {
- /* command list: (key)name -> (value)Command */
GHashTable* commands;
- /* keybindings */
GSList* keys;
GString* modkeys;
} Behaviour;