about summary refs log tree commit diff
path: root/Src/Zle/zle_main.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:10:10 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:10:10 +0000
commit2a5a899a55fd2bce10efd01c75a4bec5285aa46c (patch)
tree4744bc2f1a6b86fc1b12870be94edf96fdab4879 /Src/Zle/zle_main.c
parent9003d99d16c46b5679da7fcf1f2a41adef495ff9 (diff)
downloadzsh-2a5a899a55fd2bce10efd01c75a4bec5285aa46c.tar.gz
zsh-2a5a899a55fd2bce10efd01c75a4bec5285aa46c.tar.xz
zsh-2a5a899a55fd2bce10efd01c75a4bec5285aa46c.zip
zsh-3.1.5-pws-4 zsh-3.1.5-pws-4
Diffstat (limited to 'Src/Zle/zle_main.c')
-rw-r--r--Src/Zle/zle_main.c35
1 files changed, 26 insertions, 9 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 57b75cd39..515405a0d 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -603,11 +603,15 @@ execzlefunc(Thingy func)
 	    zsfree(msg);
 	    feep();
 	} else {
-	  startparamscope();
-	  makezleparams();
-	  doshfunc(w->u.fnnam, l, NULL, 0, 1);
-	  endparamscope();
-	  lastcmd = 0;
+	    int osc = sfcontext;
+
+	    startparamscope();
+	    makezleparams();
+	    sfcontext = SFC_WIDGET;
+	    doshfunc(w->u.fnnam, l, NULL, 0, 1);
+	    sfcontext = osc;
+	    endparamscope();
+	    lastcmd = 0;
 	}
     }
 }
@@ -856,7 +860,7 @@ static struct builtin bintab[] = {
 
 /**/
 int
-boot_zle(Module m)
+setup_zle(Module m)
 {
     /* Set up editor entry points */
     trashzleptr = trashzle;
@@ -875,6 +879,13 @@ boot_zle(Module m)
     /* initialise the keymap system */
     init_keymaps();
 
+    return 0;
+}
+
+/**/
+int
+boot_zle(Module m)
+{
     addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
     return 0;
 }
@@ -885,15 +896,21 @@ boot_zle(Module m)
 int
 cleanup_zle(Module m)
 {
-    int i;
-
     if(zleactive) {
 	zerrnam(m->nam, "can't unload the zle module while zle is active",
 	    NULL, 0);
 	return 1;
     }
-
     deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
+    return 0;
+}
+
+/**/
+int
+finish_zle(Module m)
+{
+    int i;
+
     cleanup_keymaps();
     deletehashtable(thingytab);