From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17648 invoked from network); 6 Sep 1999 09:34:14 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Sep 1999 09:34:14 -0000 Received: (qmail 26318 invoked by alias); 6 Sep 1999 09:34:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7654 Received: (qmail 26311 invoked from network); 6 Sep 1999 09:34:05 -0000 Date: Mon, 6 Sep 1999 11:34:02 +0200 (MET DST) Message-Id: <199909060934.LAA29777@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Adam Spiers's message of Sun, 5 Sep 1999 22:45:40 +0100 Subject: 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@informatik.hu-berlin.de