about summary refs log tree commit diff
path: root/Src/hist.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-06-08 09:25:39 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-06-08 09:25:39 +0000
commit805381040dd69dd02b78423d2d71913b33f3cc33 (patch)
tree1fa89ee643e8e577a2f79e76e3d6cafc93256ca2 /Src/hist.c
parentf42e3fa8e6152e145251e8f16f4c61c23dec1f59 (diff)
downloadzsh-805381040dd69dd02b78423d2d71913b33f3cc33.tar.gz
zsh-805381040dd69dd02b78423d2d71913b33f3cc33.tar.xz
zsh-805381040dd69dd02b78423d2d71913b33f3cc33.zip
zsh-3.1.5-pws-21 zsh-3.1.5-pws-21
Diffstat (limited to 'Src/hist.c')
-rw-r--r--Src/hist.c6
1 files changed, 4 insertions, 2 deletions
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);