diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -62,6 +62,8 @@ static const char *gotoline(Vis*, const char *keys, const Arg *arg); static const char *motiontype(Vis*, const char *keys, const Arg *arg); /* make the current action use the operator indicated by arg->i */ static const char *operator(Vis*, const char *keys, const Arg *arg); +/* use arg->s as command for the filter operator */ +static const char *operator_filter(Vis*, const char *keys, const Arg *arg); /* blocks to read a key and performs movement indicated by arg->i which * should be one of VIS_MOVE_{RIGHT,LEFT}_{TO,TILL} */ static const char *movement_key(Vis*, const char *keys, const Arg *arg); @@ -708,7 +710,7 @@ static KeyAction vis_action[] = { [VIS_ACTION_OPERATOR_FILTER] = { "vis-operator-filter", "Filter operator", - operator, { .i = VIS_OP_FILTER } + operator_filter, }, [VIS_ACTION_COUNT] = { "vis-count", @@ -1256,6 +1258,11 @@ static const char *operator(Vis *vis, const char *keys, const Arg *arg) { return keys; } +static const char *operator_filter(Vis *vis, const char *keys, const Arg *arg) { + vis_operator(vis, VIS_OP_FILTER, arg->s); + return keys; +} + static const char *movement_key(Vis *vis, const char *keys, const Arg *arg) { if (!keys[0]) return NULL; |
