From b58b76bca867ee2a845c695faa3f1a5853cffc60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 26 Jan 2017 15:10:32 +0100 Subject: vis: do not repeat insertion while showing prompt Previously something like `5ifoo:` would insert foo into the command prompt. --- vis-modes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vis-modes.c') diff --git a/vis-modes.c b/vis-modes.c index 4b5fb3c..4739c34 100644 --- a/vis-modes.c +++ b/vis-modes.c @@ -139,7 +139,8 @@ static void vis_mode_normal_enter(Vis *vis, Mode *old) { if (old != mode_get(vis, VIS_MODE_INSERT) && old != mode_get(vis, VIS_MODE_REPLACE)) return; macro_operator_stop(vis); - if (vis->action_prev.op == &vis_operators[VIS_OP_MODESWITCH] && vis->action_prev.count > 1) { + if (!vis->win->parent && vis->action_prev.op == &vis_operators[VIS_OP_MODESWITCH] && + vis->action_prev.count > 1) { /* temporarily disable motion, in something like `5atext` * we should only move the cursor once then insert the text */ const Movement *motion = vis->action_prev.movement; -- cgit v1.2.3