aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-11-06 11:24:18 +0100
committerMarc André Tanner <mat@brain-dump.org>2015-11-06 11:31:08 +0100
commitdd6cb7e5d7843cc10ca498f7d7bf4e26898b7d1a (patch)
tree3f7f9083c7b2427a2a14b066f78b79168e69972c /vis.c
parent08ab694b4b8c7a0b6de5033801e3bf53c693a47a (diff)
downloadvis-dd6cb7e5d7843cc10ca498f7d7bf4e26898b7d1a.tar.gz
vis-dd6cb7e5d7843cc10ca498f7d7bf4e26898b7d1a.tar.xz
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 (limited to 'vis.c')
-rw-r--r--vis.c4
1 files changed, 4 insertions, 0 deletions
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)
*/