From 20d67907c95265356b51dbdce8ecc0c1ede9e66b Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 15 Apr 1999 18:11:42 +0000 Subject: zsh-3.1.5-pws-5 --- Src/hist.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Src/hist.c') diff --git a/Src/hist.c b/Src/hist.c index a4c5735c1..d77b2febd 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -392,7 +392,7 @@ histsubchar(int c) c = ingetc(); } *ptr = 0; - if (!*buf) + if (!*buf) { if (c != '%') { if (isset(CSHJUNKIEHISTORY)) ev = curhist - 1; @@ -408,6 +408,7 @@ histsubchar(int c) else ev = defev; evset = 0; + } } else if ((t0 = atoi(buf))) { ev = (t0 < 0) ? curhist + t0 : t0; evset = 1; @@ -749,11 +750,12 @@ hend(void) save = 0; else { *hptr = '\0'; - if (hptr[-1] == '\n') + if (hptr[-1] == '\n') { if (chline[1]) { *--hptr = '\0'; } else save = 0; + } if (!*chline || !strcmp(chline, "\n") || (isset(HISTIGNORESPACE) && spaceflag)) save = 0; -- cgit 1.4.1