vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 958471431ed9d16d5ccf2a31359bdc7d078236ec parent 603ba5e6a2b1b660f01d87cf07ddb6c3ff9b03ec Author: Marc André Tanner <mat@brain-dump.org> Date: Tue, 28 Jul 2015 17:22:49 +0200 vis: pass cursor to operator implementations Diffstat:
| M | editor.h | | | 1 | + |
| M | vis.c | | | 1 | + |
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/editor.h b/editor.h @@ -67,6 +67,7 @@ typedef struct { size_t pos; /* at which byte from the start of the file should the operation start? */ bool linewise; /* should the changes always affect whole lines? */ const Arg *arg; /* arbitrary arguments */ + Cursor *cursor; /* cursor (if any) which issued this operator */ } OperatorContext; typedef struct { diff --git a/vis.c b/vis.c @@ -1353,6 +1353,7 @@ static void action_do(Action *a) { .reg = reg, .linewise = a->linewise, .arg = &a->arg, + .cursor = cursor, }; if (a->movement) {