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

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.
This commit is contained in:
Peter Stephenson 2017-06-07 10:03:41 +01:00
parent d6d7ef2a0d
commit d4947e67cc
3 changed files with 7 additions and 0 deletions

View file

@ -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.

View file

@ -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;

View file

@ -2918,6 +2918,7 @@ struct hist_stack {
int histdone;
int stophist;
int hlinesz;
zlong defev;
char *hline;
char *hptr;
short *chwords;