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

Re: New behaviour for HIST_IGNORE_SPACE option



On Tue, 26 Jun 2001, Bart Schaefer wrote:
> It seems to me that `print -s' should simply perform the deletion at
> once, replacing the pending entry with the new one.

Yes, it should.  Here's a patch.

..wayne..

---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Index: Src/hist.c
--- Src/hist.c	2001/06/08 00:15:18	1.29
+++ Src/hist.c	2001/06/28 18:05:47
@@ -922,6 +922,10 @@

     if (curline_in_ring)
 	unlinkcurline();
+    if (hist_ring && hist_ring->flags & HIST_TMPSTORE) {
+	curhist--;
+	freehistnode((HashNode)hist_ring);
+    }

     if (histlinect < histsiz) {
 	he = (Histent)zcalloc(sizeof *he);
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---



Messages sorted by: Reverse Date, Date, Thread, Author