about summary refs log tree commit diff
path: root/Src/init.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-03-09 15:57:57 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-03-09 15:57:57 +0000
commit6f3f3c6a010c43881b394cbb60c5f4938a8f43b3 (patch)
tree49fb95e8c7c2eda3cb78cecc86b737addbc3588b /Src/init.c
parent6a2d06e5d96f13d8b754c613d8129bce51455321 (diff)
downloadzsh-6f3f3c6a010c43881b394cbb60c5f4938a8f43b3.tar.gz
zsh-6f3f3c6a010c43881b394cbb60c5f4938a8f43b3.tar.xz
zsh-6f3f3c6a010c43881b394cbb60c5f4938a8f43b3.zip
26072: lexsave()/lexrestore() to fix bug with sourcing from "funny" places
Diffstat (limited to 'Src/init.c')
-rw-r--r--Src/init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/init.c b/Src/init.c
index 2c059ffc2..a3aac3e1c 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -105,6 +105,8 @@ loop(int toplevel, int justonce)
     Eprog prog;
 
     pushheap();
+    if (!toplevel)
+	lexsave();
     for (;;) {
 	freeheap();
 	if (stophist == 3)	/* re-entry via preprompt() */
@@ -199,6 +201,8 @@ loop(int toplevel, int justonce)
 	if (justonce)
 	    break;
     }
+    if (!toplevel)
+	lexrestore();
     popheap();
 }