aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-04-23 18:16:58 +0200
committerMarc André Tanner <mat@brain-dump.org>2017-04-23 18:16:58 +0200
commit90184397cba235b212c0e230db0dbb6dfc8d0aba (patch)
tree04390057e9bbc456ed85bd3b47d7713c8de71952 /vis.c
parent75ab2ed57732cb4f034c6a961e7561a91a8a6160 (diff)
downloadvis-90184397cba235b212c0e230db0dbb6dfc8d0aba.tar.gz
vis-90184397cba235b212c0e230db0dbb6dfc8d0aba.tar.xz
vis: fix # register count
Previously the # register was always reported as containing only one entry. This wrongly caused the first value to be put at all locations. Fix #544
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vis.c b/vis.c
index d4031b2..4a38903 100644
--- a/vis.c
+++ b/vis.c
@@ -821,7 +821,7 @@ void vis_do(Vis *vis) {
size_t last_reg_slot = reg_slot;
if (!reg)
reg = &vis->registers[file->internal ? VIS_REG_PROMPT : VIS_REG_DEFAULT];
- if (a->op == &vis_operators[VIS_OP_PUT_AFTER] && multiple_cursors && register_count(reg) == 1)
+ if (a->op == &vis_operators[VIS_OP_PUT_AFTER] && multiple_cursors && vis_register_count(vis, reg) == 1)
reg_slot = 0;
for (Cursor *cursor = view_cursors(view), *next; cursor; cursor = next) {