From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25943 invoked from network); 11 Nov 2004 17:47:23 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 Nov 2004 17:47:23 -0000 Received: (qmail 93863 invoked from network); 11 Nov 2004 17:47:17 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Nov 2004 17:47:17 -0000 Received: (qmail 8185 invoked by alias); 11 Nov 2004 17:47:08 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8204 Received: (qmail 8159 invoked from network); 11 Nov 2004 17:47:07 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 Nov 2004 17:47:07 -0000 Received: (qmail 92848 invoked from network); 11 Nov 2004 17:47:07 -0000 Received: from moonbase.zanshin.com (64.84.47.139) by a.mx.sunsite.dk with SMTP; 11 Nov 2004 17:47:04 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.13.1/8.13.1) with ESMTP id iABHl2AD012976; Thu, 11 Nov 2004 09:47:02 -0800 Date: Thu, 11 Nov 2004 09:47:02 -0800 (PST) From: Bart Schaefer Reply-To: zsh-users@sunsite.dk To: Stephane Chazelas cc: Zsh users list Subject: Re: [tip] mouse support In-Reply-To: <20041111162209.GC4451@sc> Message-ID: References: <20041111122011.GB4451@sc> <4483.1100184032@csr.com> <20041111162209.GC4451@sc> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 On Thu, 11 Nov 2004, Stephane Chazelas wrote: > In that new one, I tried to address the tab/newline issue. > It tries to calculate the length of the last line of the prompt, > it may fail if PS1 contains %%s or %{ %{ ... %} %} or if two > consecutive expansions of PS1 may not generate the same thing There's some code in Functions/Prompts/prompt_bart_setup in the function prompt_bart_precmd that computes the width of prompt strings. It's been specialized to expect to compute only the width of the first line of a two-line PS1, but it shouldn't be hard to adapt.