From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1901 invoked from network); 16 Nov 2007 16:46:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 16 Nov 2007 16:46:08 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 16086 invoked from network); 16 Nov 2007 16:45:59 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 Nov 2007 16:45:59 -0000 Received: (qmail 18684 invoked by alias); 16 Nov 2007 16:45:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24097 Received: (qmail 18668 invoked from network); 16 Nov 2007 16:45:56 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 16 Nov 2007 16:45:56 -0000 Received: (qmail 15870 invoked from network); 16 Nov 2007 16:45:56 -0000 Received: from vms173003pub.verizon.net (206.46.173.3) by a.mx.sunsite.dk with SMTP; 16 Nov 2007 16:45:47 -0000 Received: from torch.brasslantern.com ([71.116.71.62]) by vms173003.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JRL002TYYHCN5O2@vms173003.mailsrvcs.net> for zsh-workers@sunsite.dk; Fri, 16 Nov 2007 10:44:01 -0600 (CST) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id lAGGjcJK020038 for ; Fri, 16 Nov 2007 08:45:39 -0800 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id lAGGjbVA020037 for zsh-workers@sunsite.dk; Fri, 16 Nov 2007 08:45:37 -0800 Date: Fri, 16 Nov 2007 08:45:37 -0800 From: Bart Schaefer Subject: Re: Geoff's prompt escape sequences patch (workers/23924) In-reply-to: <237967ef0711160657x550e449ch44c78a8798238372@mail.gmail.com> To: zsh-workers@sunsite.dk Message-id: <071116084537.ZM20036@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <071018065911.ZM11918@torch.brasslantern.com> <237967ef0711160657x550e449ch44c78a8798238372@mail.gmail.com> Comments: In reply to "Mikael Magnusson" "Re: Geoff's prompt escape sequences patch (workers/23924)" (Nov 16, 3:57pm) On Nov 16, 3:57pm, Mikael Magnusson wrote: } Subject: Re: Geoff's prompt escape sequences patch (workers/23924) } } I've found another problem that seems to be caused by this patch } (located by git-bisect). When a bg'd job finishes, the cursor is drawn } in the wrong place in the new prompt (#bar characters to the left). It would appear that the starting position for the right prompt is not being recomputed correctly. It's not just that the cursor is moved left; RPS1 still begins at the same column even though it is shorter, so it doesn't reach all the way to the margin. The cursor positioning error is probably only apparent when the number of bytes in the terminfo "move left N" string is less than the number in "move to position X,Y". } The simplest test case i could find was } zsh -f } PS1="frobnizz %#" #not really needed but since the default } depends on hostname... } RPS1="foo%(1j.bar.)" } true & The effect is more obvious if you change to RPS1="%(1j.bar.)foo"