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, 4 insertions, 1 deletions
diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c
index d48ff8b42..6a50d8b99 100644
--- a/Src/Zle/zle_refresh.c
+++ b/Src/Zle/zle_refresh.c
@@ -1793,7 +1793,10 @@ refreshline(int ln)
 	    ZR_memcpy(p1, nl, nllen);
 	ZR_memset(p1 + nllen, zr_sp, winw - nllen);
 	p1[winw] = zr_zr;
-	p1[winw + 1] = (nllen < winw) ? zr_zr : nl[winw + 1];
+	if (nllen < winw)
+	    p1[winw + 1] = zr_zr;
+	else
+	    p1[winw + 1] = nl[winw + 1];
 	if (ln && nbuf[ln])
 	    ZR_memcpy(nl, p1, winw + 2);	/* next time obuf will be up-to-date */
 	else