Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Oddity with reset-prompt and vared
- X-seq: zsh-workers 28161
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: Oddity with reset-prompt and vared
- Date: Thu, 12 Aug 2010 22:14:36 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=lcqPtfnIvU+Y/J9vA7b28qCgRvQ8ZXCt8DHJUbtCFFQ=; b=cfhdqD1H0M2tPp751M+IUvGiA2OutO4UCIfpfdRwgV4U5vKCzytq3Bu5jSHcPqMm0s QJNzF1J0l74hUaqP8ZlsfZFbL0XMpj3I1RzlyCs3F6Z2k6wZRsSDLEDwFHtnmaSEJfvQ g1Ceo3M4RplKsBu4b/uPCgFtO5gaAcJnWfa/4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=fx9I58ct6KuGSEtm2wT0yEHhdMSUvb2DwavsoCwJdso0Wvo0Wjsj8UNEGWuoMcy9V3 wEvKSZo2lQ7+Oq6nFc6lC5gb8UqmROR0BuL1Pq9wNuCMiGzRXQBe98d1erzC9sz2FvC5 0y7yWvWYjrv/5SY2Fj8ZIKomFR/HzSNGPnXQM=
- In-reply-to: <20100812205613.6d09af17@pws-pc>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <AANLkTimRzdPOSNwXOhDxWxVA0GRSfUO5vFu8F+JPW4pt@xxxxxxxxxxxxxx> <20100812205613.6d09af17@pws-pc>
On 12 August 2010 21:56, Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
> On Tue, 3 Aug 2010 22:30:32 +0200
> Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>> % zsh -f
>> % function a() { zle reset-prompt; zle .accept-line }
>> % zle -N accept-line a
>> % a=
>> % vared a
>> aoeua
>> % vared a
>> ããããã<press enter>
>> <the end of the string is replaced with spaces>
>
> This is a quite general (if rather boring) problem, I'm not sure why it
> hasn't shown up before.
>
> Second hunk isn't related but looks sensible.
>
> Index: Src/Zle/zle_refresh.c
> ===================================================================
> RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_refresh.c,v
> retrieving revision 1.79
> diff -p -u -r1.79 zle_refresh.c
> --- Src/Zle/zle_refresh.c 2 Aug 2010 09:02:30 -0000 1.79
> +++ Src/Zle/zle_refresh.c 12 Aug 2010 19:54:48 -0000
> @@ -1789,7 +1789,7 @@ refreshline(int ln)
> /* 0: setup */
> nl = nbuf[ln];
> rnllen = nllen = nl ? ZR_strlen(nl) : 0;
> - if (obuf[ln]) {
> + if (ln < olnct && obuf[ln]) {
> ol = obuf[ln];
> ollen = ZR_strlen(ol);
> }
> @@ -2083,7 +2083,12 @@ refreshline(int ln)
> if (now_off)
> settextattributes(TXT_ATTR_OFF_FROM_ON(now_off));
>
> +#ifdef MULTIBYTE_SUPPORT
> + if (nl->chr != WEOF)
> + zputc(nl);
> +#else
> zputc(nl);
> +#endif
> nl++, ol++;
> ccs++, vcs++;
> #ifdef MULTIBYTE_SUPPORT
Hm, maybe this is also the source of my mysterious problem of text
sometimes disappearing from the command line very rarely. I'll keep an
eye out for if that still happens. (I may not have reported it as I
was never able to reproduce it).
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author