From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24936 invoked from network); 17 Nov 2007 10:13:54 -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=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; 17 Nov 2007 10:13:54 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 16637 invoked from network); 17 Nov 2007 10:13:46 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Nov 2007 10:13:46 -0000 Received: (qmail 1172 invoked by alias); 17 Nov 2007 10:13:42 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24099 Received: (qmail 1155 invoked from network); 17 Nov 2007 10:13:41 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 17 Nov 2007 10:13:41 -0000 Received: (qmail 16239 invoked from network); 17 Nov 2007 10:13:41 -0000 Received: from rv-out-0910.google.com (209.85.198.189) by a.mx.sunsite.dk with SMTP; 17 Nov 2007 10:13:36 -0000 Received: by rv-out-0910.google.com with SMTP id b22so803157rvf for ; Sat, 17 Nov 2007 02:13:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=ocdrslgDiXffmU8Rh1+yX3ICreq2QPAbxt+C8XrrBmc=; b=Vkab3/ZI+mNavYSVgYsMk624L9ZMN4dj0R+mdQeUQ1FvKPd6XwQKKMSCaTmC7mUhxaLm+NSCj3S9/SUJkXZXnc7xIyGWJfLgPv0QtBhYR+BzjABrPwmdA+aSrfSxL/mXpnlPC2R1F4McAIJD/PY5TMorwAu5/hHTdmS4O1LfvFM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=s/f63H5OEXXd50Pzqx/dKvk4ZTcCVIN0aSKqoCFGEaUXpd3fVIKHPepTW0g+EB/PGIqzYYCg7BsAkCKaSE0x647fF/fMa6ChbMDHTBcp2K+XBSEGcRGjN60Gjr2kQnpO7ICr1mRNHD1mGSNAKSkVsXCkZhrgtdkAYX1uCHZ45Vs= Received: by 10.143.9.5 with SMTP id m5mr808911wfi.1195294412142; Sat, 17 Nov 2007 02:13:32 -0800 (PST) Received: by 10.142.86.21 with HTTP; Sat, 17 Nov 2007 02:13:32 -0800 (PST) Message-ID: <237967ef0711170213ya76dbb7i2fec5b84dc1c3cc4@mail.gmail.com> Date: Sat, 17 Nov 2007 11:13:32 +0100 From: "Mikael Magnusson" To: "Zsh Hackers" Subject: Re: Geoff's prompt escape sequences patch (workers/23924) In-Reply-To: <20071117092655.GA19365@primenet.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <237967ef0711160657x550e449ch44c78a8798238372@mail.gmail.com> <071116084537.ZM20036@torch.brasslantern.com> <20071117092655.GA19365@primenet.com.au> On 17/11/2007, Geoff Wing wrote: > On Saturday 2007-11-17 03:46 +1100, Bart Schaefer output: > :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". > > Yes, my fault. reexpandprompt() needs to happen before resetvideo() > which uses the prompt sizes. > > :The effect is more obvious if you change to RPS1="%(1j.bar.)foo" > > I'll think this through properly a bit later (in a couple of days > or so), though I currently think this fixes it. It works here, thanks. -- Mikael Magnusson