about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/zle_vi.c2
1 files changed, 1 insertions, 1 deletions
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;