about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-10-23 08:52:02 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-10-23 08:52:02 +0000
commitb0e0d901b21721b77dd37bb34909c06e05f010da (patch)
tree635bc1ccc3c803c7e6f774d837f8a3534a2e55b3 /Src
parent2357877757159229e8364ce3f11af941c0404a53 (diff)
downloadzsh-b0e0d901b21721b77dd37bb34909c06e05f010da.tar.gz
zsh-b0e0d901b21721b77dd37bb34909c06e05f010da.tar.xz
zsh-b0e0d901b21721b77dd37bb34909c06e05f010da.zip
users/13375: trivial rewrite to ternary expression
Diffstat (limited to 'Src')
-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