From 3bfd0792b7116eacd5f9c46070b6fee236d4b956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 4 Sep 2014 22:17:19 +0200 Subject: Fix action multiplier --- config.def.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config.def.h b/config.def.h index be00942..190b1b4 100644 --- a/config.def.h +++ b/config.def.h @@ -12,7 +12,7 @@ static Mode *mode, *mode_prev; static Vis *vis; static Mode vis_modes[]; -static Action action = { .count = 1 }, action_prev = { .count = 1 }; +static Action action, action_prev; static void switchmode(const Arg *arg); static void switchmode_to(Mode *new_mode); @@ -306,7 +306,7 @@ static void mark_line(const Arg *arg) { } void action_reset(Action *a) { - a->count = 1; + a->count = 0; a->linewise = false; a->op = NULL; a->movement = NULL; @@ -318,6 +318,8 @@ void action_do(Action *a) { Text *txt = vis->win->text; Win *win = vis->win->win; size_t pos = window_cursor_get(win); + if (a->count == 0) + a->count = 1; OperatorContext c = { .count = a->count, .pos = pos, -- cgit v1.2.3