From f7111d33584a54aa28fca5660f25e8a9fecdfb0d Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Thu, 18 Aug 2011 02:24:10 +0000 Subject: 29694: avoid overwriting current history word when not expanding an alias or history event in-place. --- Src/hist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Src/hist.c') 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 */ -- cgit v1.2.3