about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-07-24 10:19:00 +0100
committerPeter Stephenson <pws@zsh.org>2015-07-24 10:19:00 +0100
commit8f8b82bc6c7ecc22bca90d624fc65e3499e43113 (patch)
tree9d8ad1ebd38f269afc8abd0f60e3e9ac26ab8ef5 /Src
parent53fe58a27825c0eaa95a9aa459650baa69c55aa2 (diff)
downloadzsh-8f8b82bc6c7ecc22bca90d624fc65e3499e43113.tar.gz
zsh-8f8b82bc6c7ecc22bca90d624fc65e3499e43113.tar.xz
zsh-8f8b82bc6c7ecc22bca90d624fc65e3499e43113.zip
35883: Don't attempt to back up over history if expanding alias
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 cf224cb4e..75e809c48 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -906,7 +906,8 @@ ihungetc(int c)
     while (!lexstop && !errflag) {
 	if (hptr[-1] != (char) c && stophist < 4 &&
 	    hptr > chline + 1 && hptr[-1] == '\n' && hptr[-2] == '\\' &&
-	    !(histactive & HA_UNGET)) {
+	    !(histactive & HA_UNGET) &&
+	    (inbufflags & (INP_ALIAS|INP_HIST)) != INP_ALIAS) {
 	    histactive |= HA_UNGET;
 	    hungetc('\n');
 	    hungetc('\\');