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, 2 insertions, 0 deletions
diff --git a/Src/Zle/zle_vi.c b/Src/Zle/zle_vi.c
index 1a11ca7d5..42dc46e7e 100644
--- a/Src/Zle/zle_vi.c
+++ b/Src/Zle/zle_vi.c
@@ -224,6 +224,7 @@ getvirange(int wf)
 	    ZS_memcpy(zleline, lastline, zlell = lastll);
 	    zlecs = pos;
 	    mark = mpos;
+	    virangeflag = 0;
 	    return -1;
 	}
 
@@ -232,6 +233,7 @@ getvirange(int wf)
 	if (!zlell || (zlecs == pos && (mark == -1 || mark == zlecs) &&
 		    virangeflag != 2) || ret == -1) {
 	    mark = mpos;
+	    virangeflag = 0;
 	    return -1;
 	}
 	virangeflag = 0;