about summary refs log tree commit diff
diff options
context:
space:
mode:
-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;