diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2011-08-18 02:24:10 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2011-08-18 02:24:10 +0000 |
commit | f7111d33584a54aa28fca5660f25e8a9fecdfb0d (patch) | |
tree | 79582b892a3fdf683945a0772a417e9ed8d50079 | |
parent | fdcabaf507ba1dd41fe1345f15989623c941ba31 (diff) | |
download | zsh-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.
-rw-r--r-- | Src/hist.c | 3 |
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 */ |