Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: hist_strip_spaces
- X-seq: zsh-workers 1953
- From: Wayne Davison <wayne@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxxxxxxxxxx>
- Subject: Re: hist_strip_spaces
- Date: Mon, 12 Aug 1996 14:13:49 -0700
- In-reply-to: wayne's message of Mon, 12 Aug 1996 12:17:53 -0700. <199608121917.MAA03396@xxxxxxxxxxxxxxx>
One problem with my patch is an optimization I added to check if
the line really needs to be rewritten -- it didn't properly handle
trailing spaces. The following patch fixes this.
..wayne..
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Index: Src/hist.c
@@ -658,7 +658,7 @@
for (i = 0, len = he->nwords-1; i < limit; i += 2)
len += he->words[i+1] - he->words[i];
- if (len == he->words[limit-1])
+ if (he->text[len] == '\0')
return;
str = zalloc(len+1);
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Messages sorted by:
Reverse Date,
Date,
Thread,
Author