From 90184397cba235b212c0e230db0dbb6dfc8d0aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sun, 23 Apr 2017 18:16:58 +0200 Subject: 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 --- vis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vis.c') 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) { -- cgit v1.2.3