summaryrefslogtreecommitdiff
path: root/Src/Zle/zle_vi.c
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2014-11-09 17:33:02 +0100
committerOliver Kiddle <opk@zsh.org>2014-11-09 17:51:26 +0100
commitf01188ec2ad14165c8e580826721cbb71c49e2a2 (patch)
tree2e56586d30d06a4235214058a12ae7e2f0950213 /Src/Zle/zle_vi.c
parent82aa706cbf83928bd08226b19736cd6e4402b802 (diff)
downloadzsh-f01188ec2ad14165c8e580826721cbb71c49e2a2.tar.gz
zsh-f01188ec2ad14165c8e580826721cbb71c49e2a2.zip
33639: fix bug with vi operators on a blank line
and with backward bracket matching
Diffstat (limited to 'Src/Zle/zle_vi.c')
-rw-r--r--Src/Zle/zle_vi.c12
1 files changed, 3 insertions, 9 deletions
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 *