zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ifh.de>
To: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Oops (was Re: Core dump in 3.0.3-test5)
Date: Mon, 12 May 1997 11:25:30 +0200	[thread overview]
Message-ID: <199705120925.LAA08606@hydra.ifh.de> (raw)
In-Reply-To: "Peter Stephenson"'s message of "Mon, 12 May 1997 10:58:10 MET." <199705120858.KAA24442@hydra.ifh.de>

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 !!<TAB>, 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 <pws@ifh.de>       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.


  reply	other threads:[~1997-05-12  9:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-05-11 18:21 Core dump in 3.0.3-test5 Bart Schaefer
1997-05-12  8:02 ` Zoltan Hidvegi
1997-05-12  8:58   ` Peter Stephenson
1997-05-12  9:25     ` Peter Stephenson [this message]
1997-05-12 17:41   ` Bart Schaefer

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=199705120925.LAA08606@hydra.ifh.de \
    --to=pws@ifh.de \
    --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).