Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Vared Using Spaces for characters
- X-seq: zsh-workers 20928
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Vared Using Spaces for characters
- Date: Fri, 04 Mar 2005 21:34:37 +0000
- In-reply-to: <dc507f4a05030319457b69d4bc@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <dc507f4a05030319457b69d4bc@xxxxxxxxxxxxxx>
Felix Rosencrantz wrote:
> % var1=fhardy@xxxxxxxx var2=jhardy@xxxxxxxx
> % vared var1 ; vared var2
> fhardy@xxxxxxxx[]
> j []
This fixes it. I'm not 100% sure we should be using strlen at all, even
in its wide character guise, instead of the lengths of the input
strings.
Index: Src/Zle/zle_refresh.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_refresh.c,v
retrieving revision 1.21
diff -u -r1.21 zle_refresh.c
--- Src/Zle/zle_refresh.c 25 Feb 2005 15:10:01 -0000 1.21
+++ Src/Zle/zle_refresh.c 4 Mar 2005 21:29:36 -0000
@@ -191,9 +191,15 @@
}
for (ln = 0; ln != winh + 1; ln++) {
if (nbuf[ln])
- *nbuf[ln] = ZWC('\n');
+ {
+ nbuf[ln][0] = ZWC('\n');
+ nbuf[ln][1] = ZWC('\0');
+ }
if (obuf[ln])
- *obuf[ln] = ZWC('\n');
+ {
+ obuf[ln][0] = ZWC('\n');
+ obuf[ln][0] = ZWC('\0');
+ }
}
/* TODO currently zsh core is not using widechars */
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Work: pws@xxxxxxx
Web: http://www.pwstephenson.fsnet.co.uk
Messages sorted by:
Reverse Date,
Date,
Thread,
Author