zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: Core dump with latest CVS
Date: Fri, 15 Sep 2006 10:57:04 +0100	[thread overview]
Message-ID: <200609150957.k8F9v4uq021513@news01.csr.com> (raw)
In-Reply-To: <20a807210609141402v31714a98wab9b75ff7736327@mail.gmail.com>

"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@csr.com>                  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


  reply	other threads:[~2006-09-15  9:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-14 21:02 Vin Shelton
2006-09-15  9:57 ` Peter Stephenson [this message]
2006-09-15 10:15   ` Peter Stephenson
2006-09-15 13:08   ` Peter Stephenson
2006-09-15 15:16     ` Bart Schaefer
2006-09-15 15:36       ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200609150957.k8F9v4uq021513@news01.csr.com \
    --to=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).