Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: hist_strip_spaces



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