zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@frontiernet.net>
To: pws@ifh.de (Peter Stephenson)
Cc: zsh-workers@math.gatech.edu
Subject: Re: added space bug fix
Date: Fri, 27 Jun 1997 00:55:32 -0400 (EDT)	[thread overview]
Message-ID: <199706270455.AAA05510@hzoli.home> (raw)
In-Reply-To: <199706260919.LAA14661@sgi.ifh.de> from Peter Stephenson at "Jun 26, 97 11:19:11 am"

> This fixes the extremely annoying bug in zsh 3.1.2 that spaces get
> repeatedly added at the end of the line during menucompletion.  It
> does it by null-terminating the line when the space is deleted (the
> logic is set up so that the space is added in case it isn't menu
> completion then deleted again when it turns out it is).
> 
> It's possible the line should be null-terminated in zle_refresh.c
> instead/also, or that some other code should pay more attention to the
> line length variable ll, but I don't dare touch any of that.

No, your patch is absolutely correct and does the Right Thing.  It was me
who introduced this bug.  Shiftchars used to copy line[ll] but I changed
it because a memory debugger tool noticed that it is reading
uninitialised memory (although that was not a real bug in that case).
When shiftchars is called from zle_tricky.c, the line should be null
terminated.  For some reason this change did not go to the ChangeLog,
although it is entered in the zle_utils.c RCS log (ChangeLog is
automatically generated from the RCS logs).  I was quite puzzled looking
at the ChangeLog and not seeing anything which can cause this bug.

Thanks,

Zoltan


      reply	other threads:[~1997-06-27  5:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-26  9:19 Peter Stephenson
1997-06-27  4:55 ` Zoltan Hidvegi [this message]

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=199706270455.AAA05510@hzoli.home \
    --to=hzoli@frontiernet.net \
    --cc=pws@ifh.de \
    --cc=zsh-workers@math.gatech.edu \
    /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).