diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-01-27 08:26:16 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-01-27 08:31:11 +0100 |
| commit | 7dc877164eb4e33a1a6537ea391066464e932956 (patch) | |
| tree | 3ae5d097da9409742498ae155edb4a3279e0c50d /main.c | |
| parent | cdd8c4b9a1544b64f2176df64dd7e24a2e08b74a (diff) | |
| download | vis-7dc877164eb4e33a1a6537ea391066464e932956.tar.gz vis-7dc877164eb4e33a1a6537ea391066464e932956.tar.xz | |
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
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } |
