WEBKIT_FIND_OPTIONS_WRAP_AROUND |
(forward ? WEBKIT_FIND_OPTIONS_NONE : WEBKIT_FIND_OPTIONS_BACKWARDS),
G_MAXUINT);
+ /* TODO get the number of matches */
c->state.search.active = TRUE;
/* Skip first search because the first match is already
* highlighted on search start. */
static VbResult normal_clear_input(Client *c, const NormalCmdInfo *info);
static VbResult normal_descent(Client *c, const NormalCmdInfo *info);
static VbResult normal_ex(Client *c, const NormalCmdInfo *info);
+static VbResult normal_fire(Client *c, const NormalCmdInfo *info);
static VbResult normal_g_cmd(Client *c, const NormalCmdInfo *info);
static VbResult normal_hint(Client *c, const NormalCmdInfo *info);
static VbResult normal_do_hint(Client *c, const char *prompt);
/* ^J 0x0a */ {NULL},
/* ^K 0x0b */ {NULL},
/* ^L 0x0c */ {NULL},
-/* ^M 0x0d */ {NULL},
+/* ^M 0x0d */ {normal_fire},
/* ^N 0x0e */ {NULL},
/* ^O 0x0f */ {normal_navigate},
/* ^P 0x10 */ {normal_queue},
return RESULT_COMPLETE;
}
+static VbResult normal_fire(Client *c, const NormalCmdInfo *info)
+{
+ /* If searching is currently active - click link containing current search
+ * highlight. We use the search_matches as indicator that the searching is
+ * active. */
+ if (c->state.search.active) {
+ webkit_web_view_run_javascript(c->webview,
+ "getSelection().anchorNode.parentNode.click();", NULL, NULL,
+ NULL);
+
+ return RESULT_COMPLETE;
+ }
+
+ return RESULT_ERROR;
+}
+
static VbResult normal_g_cmd(Client *c, const NormalCmdInfo *info)
{
Arg a;