From 7dc877164eb4e33a1a6537ea391066464e932956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Fri, 27 Jan 2017 08:26:16 +0100 Subject: vis: do not set count when handling 0 motion A count of zero is different than specifying no count. This fixes `0G` which previously moved to the start of the file. Fix #474 --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index a42d8cd..046e90c 100644 --- a/main.c +++ b/main.c @@ -1680,7 +1680,8 @@ static const char *count(Vis *vis, const char *keys, const Arg *arg) { if (0 <= digit && digit <= 9) { if (digit == 0 && count == 0) vis_motion(vis, VIS_MOVE_LINE_BEGIN); - vis_count_set(vis, count * 10 + digit); + else + vis_count_set(vis, count * 10 + digit); } return keys; } -- cgit v1.2.3