diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2014-09-04 22:17:19 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2014-09-04 22:17:19 +0200 |
| commit | 3bfd0792b7116eacd5f9c46070b6fee236d4b956 (patch) | |
| tree | 25f60698c10afc8b1181aef1a056672bc05086c8 /config.def.h | |
| parent | b6efc2b99cdd1a6ca4e946401ca0661b91754f9c (diff) | |
| download | vis-3bfd0792b7116eacd5f9c46070b6fee236d4b956.tar.gz vis-3bfd0792b7116eacd5f9c46070b6fee236d4b956.tar.xz | |
Fix action multiplier
Diffstat (limited to 'config.def.h')
| -rw-r--r-- | config.def.h | 6 |
1 files 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, |
