summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2011-08-18 02:24:10 +0000
committerBart Schaefer <barts@users.sourceforge.net>2011-08-18 02:24:10 +0000
commitf7111d33584a54aa28fca5660f25e8a9fecdfb0d (patch)
tree79582b892a3fdf683945a0772a417e9ed8d50079 /Src
parentfdcabaf507ba1dd41fe1345f15989623c941ba31 (diff)
downloadzsh-f7111d33584a54aa28fca5660f25e8a9fecdfb0d.tar.gz
zsh-f7111d33584a54aa28fca5660f25e8a9fecdfb0d.tar.xz
zsh-f7111d33584a54aa28fca5660f25e8a9fecdfb0d.zip
29694: avoid overwriting current history word when not expanding an alias
or history event in-place.
Diffstat (limited to 'Src')
-rw-r--r--Src/hist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/hist.c b/Src/hist.c
index 636f46411..aeb6edda5 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -1355,7 +1355,8 @@ ihwend(void)
 					    (chwordlen += 32) * 
 					    sizeof(short));
 	    }
-	    if (hwgetword > -1) {
+	    if (hwgetword > -1 &&
+		(inbufflags & INP_ALIAS) && !(inbufflags & INP_HIST)) {
 		/* We want to reuse the current word position */
 		chwordpos = hwgetword;
 		/* Start from where previous word ended, if possible */