From 805381040dd69dd02b78423d2d71913b33f3cc33 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Tue, 8 Jun 1999 09:25:39 +0000 Subject: zsh-3.1.5-pws-21 --- 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 6b2c2a653..4d672deab 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -58,8 +58,8 @@ int excs, exlast; * the line does not get added to the list until hend(), if at all. * However, curhist is incremented to reflect the current line anyway * and a temporary history entry is inserted while the user is editing. - * If the resulting line was not added to the list, curhist is - * decremented in hend(). + * If the resulting line was not added to the list, a flag is set so + * that curhist will be decremented in hbegin(). */ /**/ @@ -984,6 +984,8 @@ hend(void) void remhist(void) { + if (hist_ring == &curline) + return; if (!(histactive & HA_ACTIVE)) { if (!(histactive & HA_JUNKED)) { freehistnode((HashNode)hist_ring); -- cgit 1.4.1