vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit bb1294cda6332b699cf82788b506747d37ba80ad parent a001b8bb6f162042d6b0cf366c489c220dee0ca8 Author: Marc André Tanner <mat@brain-dump.org> Date: Sat, 13 Sep 2014 23:04:20 +0200 Rename OP_PASTE to OP_PUT Diffstat:
| M | config.def.h | | | 2 | +- |
| M | vis.c | | | 8 | ++++---- |
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/config.def.h b/config.def.h @@ -195,7 +195,7 @@ static KeyBinding vis_operators[] = { { { NONE('d') }, operator, { .i = OP_DELETE } }, { { NONE('c') }, operator, { .i = OP_CHANGE } }, { { NONE('y') }, operator, { .i = OP_YANK } }, - { { NONE('p') }, operator, { .i = OP_PASTE } }, + { { NONE('p') }, operator, { .i = OP_PUT } }, { /* empty last element, array terminator */ }, }; diff --git a/vis.c b/vis.c @@ -145,7 +145,7 @@ static Action action_prev; /* last operator action used by the repeat '.' key * /** operators */ static void op_change(OperatorContext *c); static void op_yank(OperatorContext *c); -static void op_paste(OperatorContext *c); +static void op_put(OperatorContext *c); static void op_delete(OperatorContext *c); /* these can be passed as int argument to operator(&(const Arg){ .i = OP_*}) */ @@ -153,14 +153,14 @@ enum { OP_DELETE, OP_CHANGE, OP_YANK, - OP_PASTE, + OP_PUT, }; static Operator ops[] = { [OP_DELETE] = { op_delete, false }, [OP_CHANGE] = { op_change, false }, [OP_YANK] = { op_yank, false }, - [OP_PASTE] = { op_paste, true }, + [OP_PUT] = { op_put, true }, }; /* these can be passed as int argument to movement(&(const Arg){ .i = MOVE_* }) */ @@ -447,7 +447,7 @@ static void op_yank(OperatorContext *c) { register_put(c->reg, vis->win->text, &c->range); } -static void op_paste(OperatorContext *c) { +static void op_put(OperatorContext *c) { size_t pos = window_cursor_get(vis->win->win); if (c->reg->linewise) pos = text_line_next(vis->win->text, pos);