1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-06-20 02:29:41 +02:00

users/13375: trivial rewrite to ternary expression

This commit is contained in:
Peter Stephenson 2008-10-23 08:52:02 +00:00
parent 2357877757
commit b0e0d901b2
2 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -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