1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 10:01:11 +02:00

29694: avoid overwriting current history word when not expanding an alias

or history event in-place.
This commit is contained in:
Bart Schaefer 2011-08-18 02:24:10 +00:00
parent fdcabaf507
commit f7111d3358

View file

@ -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 */