From dd6cb7e5d7843cc10ca498f7d7bf4e26898b7d1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Fri, 6 Nov 2015 11:24:18 +0100 Subject: 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. --- vis.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vis.c') diff --git a/vis.c b/vis.c index 1cd473a..ae3dab5 100644 --- 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) */ -- cgit v1.2.3