summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/zle_refresh.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 286abeaf8..a7724aa28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-23  Peter Stephenson  <pws@csr.com>
+
+	* users/13375: Src/Zle/zle_refresh.c: rewrite ternary expression
+	which caused problems with the Sun Studio 11 compiler.
+
 2008-10-22  Barton E. Schaefer  <schaefer@zsh.org>
 
 	* 25927: Completion/Unix/Type/_path_files: include the ignored
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