From f01188ec2ad14165c8e580826721cbb71c49e2a2 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Sun, 9 Nov 2014 17:33:02 +0100 Subject: 33639: fix bug with vi operators on a blank line and with backward bracket matching --- Src/Zle/zle_vi.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'Src/Zle/zle_vi.c') diff --git a/Src/Zle/zle_vi.c b/Src/Zle/zle_vi.c index d74b40d62..a60caa2b4 100644 --- a/Src/Zle/zle_vi.c +++ b/Src/Zle/zle_vi.c @@ -202,7 +202,6 @@ getvirange(int wf) zmult = mult1 * zmod.tmult; } while(prefixflag && !ret); wordflag = 0; - virangeflag = 0; /* It is an error to use a non-movement command to delimit the * * range. We here reject the case where the command modified * @@ -222,14 +221,9 @@ getvirange(int wf) /* vi-match-bracket changes the value of virangeflag when * * moving to the opening bracket, meaning that we need to * * change the *starting* position. */ - if(virangeflag == -1) - { - int origcs = zlecs; - zlecs = pos; - INCCS(); - pos = zlecs; - zlecs = origcs; - } + if (virangeflag == -1) + INCPOS(pos); + virangeflag = 0; /* Get the range the right way round. zlecs is placed at the * * start of the range, and pos (the return value of this * -- cgit 1.4.1