Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Miscellaneous buglettes



Adam Spiers wrote:

>   - zle -R foo from the command line prints garbage.

It shouldn't be possible to call it outside widget functions.

Bye
 Sven

diff -u os/Zle/zle_thingy.c Src/Zle/zle_thingy.c
--- os/Zle/zle_thingy.c	Thu Sep  2 11:39:18 1999
+++ Src/Zle/zle_thingy.c	Mon Sep  6 11:32:52 1999
@@ -399,6 +399,10 @@
     char *s = statusline;
     int sl = statusll, ocl = clearlist;
 
+    if (!zleactive) {
+	zerrnam(name, "can only be called from widget function", NULL, 0);
+	return 1;
+    }
     statusline = NULL;
     statusll = 0;
     if (*args) {
@@ -435,6 +439,10 @@
 {
     char *p = *args;
 
+    if (!zleactive) {
+	zerrnam(name, "can only be called from widget function", NULL, 0);
+	return 1;
+    }
     while (*p)
 	ungetkey((int) *p++);
     return 0;

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author