about summary refs log tree commit diff
path: root/Src/init.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-08-04 17:32:19 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-08-04 17:32:19 +0000
commit4fc027edf0bec7890a6171e45b6e28cbffbf6f0a (patch)
tree77944c50d2688783cfb1fb8d4defdefdddc58527 /Src/init.c
parent6e4adee61573e0d96918ecf1b64d265098dde547 (diff)
downloadzsh-4fc027edf0bec7890a6171e45b6e28cbffbf6f0a.tar.gz
zsh-4fc027edf0bec7890a6171e45b6e28cbffbf6f0a.tar.xz
zsh-4fc027edf0bec7890a6171e45b6e28cbffbf6f0a.zip
25384: fix problem with incorrect autoloads of zsh/zle
Diffstat (limited to 'Src/init.c')
-rw-r--r--Src/init.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/Src/init.c b/Src/init.c
index fcbf9236c..a21b39639 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -1206,14 +1206,22 @@ VA_DCL
     /* autoload */
     switch (zle_load_state) {
     case 0:
-	if (load_module("zsh/zle", NULL, 0) != 1) {
-	    (void)load_module("zsh/compctl", NULL, 0);
-	    ret = zle_entry_ptr(cmd, ap);
-	    /* Don't execute fallback code */
-	    cmd = -1;
-	} else {
-	    zle_load_state = 2;
-	    /* Execute fallback code below */
+	/*
+	 * Some commands don't require us to load ZLE.
+	 * These also have no fallback.
+	 */
+	if (cmd != ZLE_CMD_TRASH && cmd != ZLE_CMD_RESET_PROMPT &&
+	    cmd != ZLE_CMD_REFRESH)
+	{
+	    if (load_module("zsh/zle", NULL, 0) != 1) {
+		(void)load_module("zsh/compctl", NULL, 0);
+		ret = zle_entry_ptr(cmd, ap);
+		/* Don't execute fallback code */
+		cmd = -1;
+	    } else {
+		zle_load_state = 2;
+		/* Execute fallback code below */
+	    }
 	}
 	break;