about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-04-17 16:18:41 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-04-17 16:18:41 +0000
commitfb0db3729795afdbc2c10cbedfa1e483189f6588 (patch)
tree08cd0f1766a734435e667dbeaacf378f86d66e95
parent3006b5ca1203e3ea30f5f4aae3e6e3f3e9fa758a (diff)
downloadzsh-fb0db3729795afdbc2c10cbedfa1e483189f6588.tar.gz
zsh-fb0db3729795afdbc2c10cbedfa1e483189f6588.tar.xz
zsh-fb0db3729795afdbc2c10cbedfa1e483189f6588.zip
fix vi-replace-chars
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/zle_vi.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 390a21c22..ab0db8de2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-04-17  Peter Stephenson  <pws@csr.com>
 
+	* 24829: Jun T.: Src/Zle/zle_vi.c: vi-replace-chars got broken
+	in the crossfire.
+
 	* 24825: Src/utils.c, Src/Zle/zle_word.c: fix internal
 	word-boundary widgets and make zero-width punctuation
 	characters always part of a word.
diff --git a/Src/Zle/zle_vi.c b/Src/Zle/zle_vi.c
index 068274a8e..c807da359 100644
--- a/Src/Zle/zle_vi.c
+++ b/Src/Zle/zle_vi.c
@@ -497,7 +497,7 @@ vireplacechars(UNUSED(char **args))
     int n = zmult, origcs = zlecs, fail = 0;
 
     if (n > 0) {
-	while (n > 0) {
+	while (n-- > 0) {
 	    if (zlecs == zlell || zleline[zlell] == ZWC('\n')) {
 		fail = 1;
 		break;