From: Wayne Davison <wayne@clari.net>
To: Zsh hackers list <zsh-workers@math.gatech.edu>
Subject: Re: hist_strip_spaces
Date: Mon, 12 Aug 1996 14:13:49 -0700 [thread overview]
Message-ID: <199608122113.OAA03985@bebop.clari.net> (raw)
In-Reply-To: wayne's message of Mon, 12 Aug 1996 12:17:53 -0700. <199608121917.MAA03396@bebop.clari.net>
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---
next prev parent reply other threads:[~1996-08-12 21:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-08-12 12:56 histignoredups done properly Peter Stephenson
1996-08-12 19:17 ` hist_strip_spaces (was Re: histignoredups done properly) Wayne Davison
1996-08-12 21:13 ` Wayne Davison [this message]
1996-08-13 9:22 ` hist_strip_spaces Wayne Davison
1996-08-13 5:48 ` hist_strip_spaces (was Re: histignoredups done properly) Andrej Borsenkow
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=199608122113.OAA03985@bebop.clari.net \
--to=wayne@clari.net \
--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).