vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 37cb7af023485c26be750945cd1253afa0d7d4ec parent 108e267e9b78e311921efa143491889f85c760ba Author: Marc André Tanner <mat@brain-dump.org> Date: Fri, 6 Nov 2015 11:24:18 +0100 vis: do something reasonable upon visual repeat We do currently deliberately not support visual repeat. However when there exist multiple cursors, repeating an operator, which acted on a previous visual selection, should not collapse the cursors. Diffstat:
| M | vis.c | | | 4 | ++++ |
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/vis.c b/vis.c @@ -1609,6 +1609,10 @@ static void action_do(Vis *vis, Action *a) { } if (a->op) { + /* we do not support visual repeat, still do something resonable */ + if (vis->mode->visual && !a->movement && !a->textobj) + a->movement = &moves[MOVE_NOP]; + /* operator implementations must not change the mode, * they might get called multiple times (once for every cursor) */