about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-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();
 }