aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-06-13 14:30:56 +0200
committerMarc André Tanner <mat@brain-dump.org>2017-06-15 15:51:43 +0200
commit21adfe438b32cd0cd41ca00e99adfe827c4f4a95 (patch)
tree511abd57bc289174da5821c7109d26e9c2b53e72 /vis.c
parenta845dec7336c379d007832cbc5ff9abbb9fe1dab (diff)
downloadvis-21adfe438b32cd0cd41ca00e99adfe827c4f4a95.tar.gz
vis-21adfe438b32cd0cd41ca00e99adfe827c4f4a95.tar.xz
view: do not automatically anchor selections when setting range
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vis.c b/vis.c
index 1ba6ff2..cd22e4d 100644
--- a/vis.c
+++ b/vis.c
@@ -971,8 +971,10 @@ void vis_do(Vis *vis) {
if (linewise && vis->mode != &vis_modes[VIS_MODE_VISUAL])
c.range = text_range_linewise(txt, &c.range);
- if (vis->mode->visual)
+ if (vis->mode->visual) {
view_selections_set(sel, &c.range);
+ view_selections_anchor(sel);
+ }
if (a->op) {
size_t pos = a->op->func(vis, txt, &c);