From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16802 invoked from network); 12 May 1997 09:44:05 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 12 May 1997 09:44:05 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id FAA07237; Mon, 12 May 1997 05:22:03 -0400 (EDT) Resent-Date: Mon, 12 May 1997 05:22:03 -0400 (EDT) Message-Id: <199705120925.LAA08606@hydra.ifh.de> To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Oops (was Re: Core dump in 3.0.3-test5) In-reply-to: "Peter Stephenson"'s message of "Mon, 12 May 1997 10:58:10 MET." <199705120858.KAA24442@hydra.ifh.de> Date: Mon, 12 May 1997 11:25:30 +0200 From: Peter Stephenson Resent-Message-ID: <"8R5-c3.0.ym1.w4kTp"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3132 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Peter Stephenson (moi) wrote: > There's another aspect to this, at least in 3.1.x after the latest > history reorganisation. I've just remembered why I needed HA_NOINC and it's still necessary. Otherwise, when you do !!, it thinks you want the line before last. Try _this_ more minimal (grammar??) patch instead. *** Src/hist.c.has Fri May 9 11:29:08 1997 --- Src/hist.c Mon May 12 11:18:57 1997 *************** *** 567,579 **** curhistent = gethistent(curhist); if (!curhistent->ftim) curhistent->ftim = time(NULL); if (interact && isset(SHINSTDIN) && !strin) { attachtty(mypgrp); defev = curhist; - histactive = HA_ACTIVE; curhist++; } else ! histactive = HA_NOINC; } /* compare current line with history entry using only text in words */ --- 567,579 ---- curhistent = gethistent(curhist); if (!curhistent->ftim) curhistent->ftim = time(NULL); + histactive = HA_ACTIVE; if (interact && isset(SHINSTDIN) && !strin) { attachtty(mypgrp); defev = curhist; curhist++; } else ! histactive |= HA_NOINC; } /* compare current line with history entry using only text in words */ *************** *** 762,771 **** chwordpos--; /* make sure we're on a word start, not end */ /* If we're expanding an alias, we should overwrite the expansion * in the history. - * If we're in a string, we don't need the full history line - * and can overwrite also. */ ! if (((inbufflags & INP_ALIAS) || strin) && !(inbufflags & INP_HIST)) hwgetword = chwordpos; else hwgetword = -1; --- 762,769 ---- chwordpos--; /* make sure we're on a word start, not end */ /* If we're expanding an alias, we should overwrite the expansion * in the history. */ ! if ((inbufflags & INP_ALIAS) && !(inbufflags & INP_HIST)) hwgetword = chwordpos; else hwgetword = -1; -- Peter Stephenson Tel: +49 33762 77366 WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77413 Deutsches Elektronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen DESY-IfH, 15735 Zeuthen, Germany.