diff options
author | Peter Stephenson <pws@zsh.org> | 2017-06-07 10:03:41 +0100 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2017-06-07 10:03:41 +0100 |
commit | d4947e67cc17432372f721928e7a47031460fce0 (patch) | |
tree | f3aaff0ff8f25a82660eccc1ce0c8117deb353eb | |
parent | d6d7ef2a0dbf3662eaa132040d2ddfdd7625a3ea (diff) | |
download | zsh-d4947e67cc17432372f721928e7a47031460fce0.tar.gz zsh-d4947e67cc17432372f721928e7a47031460fce0.tar.xz zsh-d4947e67cc17432372f721928e7a47031460fce0.zip |
41239: Save and restore default history event on context stack.
This ensures that the default event set by an expansion in ZLE doesn't propagate to the command line expansion.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Src/hist.c | 2 | ||||
-rw-r--r-- | Src/zsh.h | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 817b1ccbf..644be7c52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2017-06-07 Peter Stephenson <p.stephenson@samsung.com> + * 41239: Src/hist.c, Src/zsh.h: Save and restore default history + event on context stack. This prevents expansions in ZLE from + propagating to the command line expansion. + * Sebastian: 41232: Functions/Misc/zed: use terminfo to find page up/down keys where available. diff --git a/Src/hist.c b/Src/hist.c index 350688d2d..da5a8b29f 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -253,6 +253,7 @@ hist_context_save(struct hist_stack *hs, int toplevel) hs->hwend = hwend; hs->addtoline = addtoline; hs->hlinesz = hlinesz; + hs->defev = defev; /* * We save and restore the command stack with history * as it's visible to the user interactively, so if @@ -296,6 +297,7 @@ hist_context_restore(const struct hist_stack *hs, int toplevel) hwend = hs->hwend; addtoline = hs->addtoline; hlinesz = hs->hlinesz; + defev = hs->defev; if (cmdstack) zfree(cmdstack, CMDSTACKSZ); cmdstack = hs->cstack; diff --git a/Src/zsh.h b/Src/zsh.h index 22f73f806..137b2a52a 100644 --- a/Src/zsh.h +++ b/Src/zsh.h @@ -2918,6 +2918,7 @@ struct hist_stack { int histdone; int stophist; int hlinesz; + zlong defev; char *hline; char *hptr; short *chwords; |