Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Core dump with latest CVS
- X-seq: zsh-workers 22708
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: Core dump with latest CVS
- Date: Fri, 15 Sep 2006 10:57:04 +0100
- In-reply-to: <20a807210609141402v31714a98wab9b75ff7736327@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20a807210609141402v31714a98wab9b75ff7736327@xxxxxxxxxxxxxx>
"Vin Shelton" wrote:
> Peter,
>
> I think your latest prompt/subst changes broke something. Here's a recipe:
>
> zsh -f
> setopt NO_PROMPT_SP
> autoload -U promptinit
> promptinit
> prompt bart
>
> zsh: floating point exception (core dumped)
Yes, I get this.
The reason is this:
${(pl.COLUMNS..\b.)}
\b used to be treated as length 1; now we take its width. For control
characters currently we assume width 1. This causes the padding width
to be zero, which causes the shell to crash: I can fix the crash easily.
The other question is how to make the padding work when it's simply used
for repetition:
- Mostly the problem is just control characters. I noted one before.
We could assume these have length 1 rather than 0 (and document this,
obviously). It's not particularly logical but it fixes up most of the
problem cases without any need for tricks involving multibyte mode or
new features. Most users probably won't be (directly) affected anyway.
- I could add a flag (b is available) to force the old way just for
the current padding.
- Something else involving new flags.
- require an explicit "unsetopt multibyte" for that to work as it used
to. Yuk.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php
Messages sorted by:
Reverse Date,
Date,
Thread,
Author