diff options
Diffstat (limited to 'src/normal.c')
-rw-r--r-- | src/normal.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/normal.c b/src/normal.c index 62a51f8..fa4c7d6 100644 --- a/src/normal.c +++ b/src/normal.c @@ -56,6 +56,7 @@ 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_focus_last_active(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); @@ -186,7 +187,7 @@ static struct { /* f 0x66 */ {normal_ex}, /* g 0x67 */ {normal_g_cmd}, /* h 0x68 */ {normal_scroll}, -/* i 0x69 */ {NULL}, +/* i 0x69 */ {normal_focus_last_active}, /* j 0x6a */ {normal_scroll}, /* k 0x6b */ {normal_scroll}, /* l 0x6c */ {normal_scroll}, @@ -443,6 +444,20 @@ static VbResult normal_fire(Client *c, const NormalCmdInfo *info) return RESULT_ERROR; } +static VbResult normal_focus_last_active(Client *c, const NormalCmdInfo *info) +{ + GVariant *variant; + gboolean focused; + + variant = ext_proxy_eval_script_sync(c, "vimb_input_mode_element.focus();"); + g_variant_get(variant, "(bs)", &focused); + if (!focused) { + ext_proxy_focus_input(c); + } + + return RESULT_ERROR; +} + static VbResult normal_g_cmd(Client *c, const NormalCmdInfo *info) { Arg a; |