From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4341 invoked by alias); 14 Dec 2013 18:45:04 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32108 Received: (qmail 22736 invoked from network); 14 Dec 2013 18:44:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:subject:message-id:date:to:mime-version; bh=ZYTW7SO5qvAZclemUv6yX6/8bnA1wtttaGPJdtUtCjo=; b=TcxcLPGelStXYI5MDS0zmHIBQlg2xL4ClwUoTItADStBMWIgnJNBptYcU9Fyv/YGbu 4hJ9XVtBAcdYkR5AvxpHMueFbxTKosxe1W9U9VfPJFoz1J5zSj4klZWMHkggWUJ+bt6y 784HFed8x8Y7A6DCqnks52BOn6kbugHgrIlWsL4jX7sOzIPzLHtzoCCnX/0wWJC4ILzj 5eZCFcGFQIStAP8i4vZ/U7z2KKaOusrxk+lCJ4FF/jw6ynaUlYRUsHoVgBlWIZkJfQbi vZyUotwI46xwBkqmX1Js4tMQJJwGYPpLNp7FE6whvJxFdqx3iUUtZl2QzHyL1Q5ddGiD ZZtQ== X-Received: by 10.205.46.201 with SMTP id up9mr106777bkb.64.1387046693714; Sat, 14 Dec 2013 10:44:53 -0800 (PST) From: Patrick Oscity Content-Type: multipart/signed; boundary="Apple-Mail=_8040BA3C-4B76-451B-A845-C8ED8983DD18"; protocol="application/pgp-signature"; micalg=pgp-sha512 Subject: Bug report Message-Id: <9CB4226B-47EE-44FA-8F8F-01DF4CB5154D@gmail.com> Date: Sat, 14 Dec 2013 19:44:49 +0100 To: zsh-workers@zsh.org Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) X-Mailer: Apple Mail (2.1822) --Apple-Mail=_8040BA3C-4B76-451B-A845-C8ED8983DD18 Content-Type: multipart/mixed; boundary="Apple-Mail=_7CA38C72-72DE-4620-BA11-EF6B644959BC" --Apple-Mail=_7CA38C72-72DE-4620-BA11-EF6B644959BC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Dear zsh team, I think I might have found a bug in zsh. Here is my bug report: Steps to reproduce * add a simple RPROMPT to ~/.zshrc, e.g. RPROMPT=3D'X' * optionally set PROMPT=3D'$ ' to avoid side-effects of escape sequences like color codes etc. Actual outcome * the right prompt is not right aligned, it is in fact shifted = to the left by one character * this means that there is one character of space wasted * it is also optically disturbing, e.g. when using tmux and the right prompt does not align with tmux's status bar Expected outcome * the right prompt should be right aligned, using the full available width of the terminal Attached is a diff for zle_refresh.c that fixes the issue for me, = although I now have to compile zsh myself. It would however be great to = see this corrected in an official release of zsh. Thanks for your = consideration! Best, Patrick --Apple-Mail=_7CA38C72-72DE-4620-BA11-EF6B644959BC Content-Disposition: attachment; filename=zle_refresh.c.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="zle_refresh.c.diff" Content-Transfer-Encoding: 7bit diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c index 17b78ce..f136178 100644 --- a/Src/Zle/zle_refresh.c +++ b/Src/Zle/zle_refresh.c @@ -1576,7 +1576,7 @@ zrefresh(void) else put_rpmpt = rprompth == 1 && rpromptbuf[0] && !strchr(rpromptbuf, '\t') && - (int)ZR_strlen(nbuf[0]) + rpromptw < winw - 1; + (int)ZR_strlen(nbuf[0]) + rpromptw < winw; } else { /* insert >.... on first line if there is more text before start of screen */ ZR_memset(nbuf[0], zr_sp, lpromptw); @@ -1631,9 +1631,9 @@ zrefresh(void) if (put_rpmpt && !iln && !oput_rpmpt) { int attrchange; - moveto(0, winw - 1 - rpromptw); + moveto(0, winw - rpromptw); zputs(rpromptbuf, shout); - vcs = winw - 1; + vcs = winw; /* reset character attributes to that set by the main prompt */ txtchange = pmpt_attr; /* --Apple-Mail=_7CA38C72-72DE-4620-BA11-EF6B644959BC Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_7CA38C72-72DE-4620-BA11-EF6B644959BC-- --Apple-Mail=_8040BA3C-4B76-451B-A845-C8ED8983DD18 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJSrKchAAoJEMy7OC9fnReGwo4QALHA1ONj1qnTHz4h3gyCQP+V 09RbBu8Ah6/Fvr8fOLaWjoZQewAJxl3arPvu1BLEaFDzXPIax016PgmnxrTWzwEy bM4z25EYNVH2k7Utb3uGiF4K1y6OwpSsOb0YtBocGWhuMipPMW8PGmcyA5dvj87v MbLAPk1desLv0yIojocqKeWfzWPo5QWKqxZzzvD1r2HuhacIlIQ4zDLyOixukvMj DlONPARM8vZIuGRLhhK74NMw9tQ6fdCG+DVV15710F9jXOKlIM1mZE9aPNtXnFRb AiSGoe/SFkBh8mNZ7K+vCPDk3OVvq9mV70taqpds1v87jl9ftVk0Hq49J2T/lOiF 7WkdGJF1pBVEMLvhmRhYHOhq28XKtnlnUxZughHwb0Qiq6+kFZ0g2lXmaztANwIo 8DmZfRZIqdqMefrljb1HXWkSO83nWRQ68jD2qjzn08iEWzpsAuErW++sEKgghZPc E5jvOlkLmMcHYecahwxRmGMAqI/gMTgR8DuNouQFO3nxCny6j1hgymZ4pIGRVPc5 BYxJBxCjIR7hVq8vHBrd0WElwcqU1euk8zKBzqup03Q3auMxINfBZFb3dDypC4gJ Kdoosax0noxouMnB4w3KVNEP8aGxkPYdkhgXFst1QXIXtgupHDkctFfKvjq10gBH 6RxrrW/aKyOEoXz3IF1F =nRTx -----END PGP SIGNATURE----- --Apple-Mail=_8040BA3C-4B76-451B-A845-C8ED8983DD18--