From d4947e67cc17432372f721928e7a47031460fce0 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 7 Jun 2017 10:03:41 +0100 Subject: 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. --- Src/hist.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Src/hist.c') 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; -- cgit v1.2.3