diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-07-27 23:57:33 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-09-15 11:35:26 +0200 |
| commit | 8162e86bc20a581cb7e82ba51893acbdbb7c6a37 (patch) | |
| tree | 9d827debf75bf1ba18fce56cb2607e0e7a0bd215 /vis-operators.c | |
| parent | 791330584baaf3b809047719d74308dc54f28bac (diff) | |
| download | vis-8162e86bc20a581cb7e82ba51893acbdbb7c6a37.tar.gz vis-8162e86bc20a581cb7e82ba51893acbdbb7c6a37.tar.xz | |
vis: remove ! operator
Use visual mode and :| to filter text through external commands.
The mapping was already reused for selection complement.
Diffstat (limited to 'vis-operators.c')
| -rw-r--r-- | vis-operators.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/vis-operators.c b/vis-operators.c index 38dfbae..bd09f24 100644 --- a/vis-operators.c +++ b/vis-operators.c @@ -244,10 +244,6 @@ static size_t op_replace(Vis *vis, Text *txt, OperatorContext *c) { return c->range.start; } -static size_t op_filter(Vis *vis, Text *txt, OperatorContext *c) { - return text_size(txt) + 1; /* do not change cursor position, would destroy selection */ -} - int vis_operator_register(Vis *vis, VisOperatorFunction *func, void *context) { Operator *op = calloc(1, sizeof *op); if (!op) @@ -289,9 +285,6 @@ bool vis_operator(Vis *vis, enum VisOperator id, ...) { case VIS_OP_JOIN: vis->action.arg.s = va_arg(ap, char*); break; - case VIS_OP_FILTER: - vis->action.arg.s = va_arg(ap, char*); - /* fall through */ case VIS_OP_SHIFT_LEFT: case VIS_OP_SHIFT_RIGHT: vis_motion_type(vis, VIS_MOTIONTYPE_LINEWISE); @@ -359,5 +352,4 @@ const Operator vis_operators[] = { [VIS_OP_MODESWITCH] = { op_modeswitch }, [VIS_OP_REPLACE] = { op_replace }, [VIS_OP_CURSOR_SOL] = { op_cursor }, - [VIS_OP_FILTER] = { op_filter }, }; |
