vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit a0904924907eb72c09c8f9d38eff7a5a9e272202 parent 92c07db00692517b7b45083b221ccc589b191652 Author: Marc André Tanner <mat@brain-dump.org> Date: Fri, 27 Jan 2017 08:26:16 +0100 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:
| M | main.c | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git 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; }