From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11758 invoked by alias); 8 Jan 2010 01:00:20 -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: 27583 Received: (qmail 9127 invoked from network); 8 Jan 2010 01:00:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) 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.5 Received-SPF: pass (ns1.primenet.com.au: SPF record at sergio.spb.ru designates 194.58.105.39 as permitted sender) Message-ID: <4B468397.4070209@sergio.spb.ru> Date: Fri, 08 Jan 2010 04:00:07 +0300 From: sergio User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: zsh-workers@zsh.org Subject: Re: PATCH: zcalc prompt fix References: <4B44DD08.7040700@sergio.spb.ru> <20100107213326.582fb96c@pws-pc> <4B466A0F.9080109@sergio.spb.ru> <2d460de71001071615h47ea843dx7b71da32a2b5d86a@mail.gmail.com> In-Reply-To: <2d460de71001071615h47ea843dx7b71da32a2b5d86a@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 08.01.2010 03:15, Richard Hartmann wrote: > What line exactly? What do you do to trigger the bug? > Can you reproduce it with zsh -f, and if not, what do you > need to do so that you can reproduce it? I thought it would be much easier. This is very simple bug. It occurs due to the incorrect prompt length calculations. It reproduces with zsh -f. % zsh -f % autoload zcalc % ZCALCPROMPT="%F{red}%1v%f> " % echo "$COLUMNS - `echo "${(%)ZCALCPROMPT}" | wc -c`" | bc 67 % zcalc 1> When you'll type 67'th character, prompt will disappear. It doesn't scroll to the right, but overwrites. After this you will not possible to edit beginning of the line anymore. -- sergio.