aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-06-13 15:32:29 +0200
committerMarc André Tanner <mat@brain-dump.org>2017-06-15 15:51:43 +0200
commitb6f349e81003e970992d48248f65354cba283c7c (patch)
tree9b62ebcf46aa04c4dea1fc69688d9a5e757a583b /vis.c
parent60e6cf29521f3fa4bbb41b96e68b54f9502d7b96 (diff)
downloadvis-b6f349e81003e970992d48248f65354cba283c7c.tar.gz
vis-b6f349e81003e970992d48248f65354cba283c7c.tar.xz
vis: normalize selections after motions
Merge overlapping selections. Fix #582
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 cd22e4d..df29941 100644
--- a/vis.c
+++ b/vis.c
@@ -984,10 +984,14 @@ void vis_do(Vis *vis) {
if (vis->mode->visual)
view_selections_save(sel);
view_cursors_to(sel, pos);
+ if (vis->mode->visual)
+ view_selection_clear(sel);
}
}
}
+ view_selections_normalize(view);
+
if (a->op) {
if (a->op == &vis_operators[VIS_OP_YANK] ||