summary refs log tree commit diff
path: root/Src/Zle/zle_refresh.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle/zle_refresh.c')
-rw-r--r--Src/Zle/zle_refresh.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c
index f0351ad15..467629d25 100644
--- a/Src/Zle/zle_refresh.c
+++ b/Src/Zle/zle_refresh.c
@@ -1037,8 +1037,6 @@ zrefresh(void)
 	    region_highlights[0].start = mark;
 	    region_highlights[0].end = zlecs;
 	}
-	if (invicmdmode())
-	    INCPOS(region_highlights[0].end);
 	if (region_active == 2) {
 	    int origcs = zlecs;
 	    zlecs = region_highlights[0].end;
@@ -1046,7 +1044,8 @@ zrefresh(void)
 	    zlecs = region_highlights[0].start;
 	    region_highlights[0].start = findbol();
 	    zlecs = origcs;
-	}
+	} else if (invicmdmode())
+	    INCPOS(region_highlights[0].end);
     } else {
 	region_highlights[0].start = region_highlights[0].end = -1;
     }