From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11889 invoked from network); 7 Jul 1999 13:35:19 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Jul 1999 13:35:19 -0000 Received: (qmail 22441 invoked by alias); 7 Jul 1999 13:35:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7012 Received: (qmail 22434 invoked from network); 7 Jul 1999 13:35:13 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "Bart Schaefer" , "Sven Wischnowsky" , Subject: Some help neede :-) RE: PS1 or PS2 Date: Wed, 7 Jul 1999 17:34:49 +0400 Message-ID: <002301bec87d$7c1264c0$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <990629152431.ZM21113@candle.brasslantern.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 > > I think they reflect real ZLE buffers. The "problem" is with the way that > push-input/get-line (and consequently push-line-or-edit) are implemented: > They do something similar to > > print -z "$BUFFER" > BUFFER="" > > and then wait for zle_refresh() to come around and yank the buffer back. > So if you're entirely inside a zle widget (or a bindkey -s), you can't do > anything to the pushed input; it simply isn't there anymore until zsh has > a chance to print a prompt again. > Yes, something like it. Currently I managed it so far, that it does redisplay a line ... with a small problem :-( Looking in pushlineoredit() I found, that it unconditionally set both ``errflag'' (why?) and ``done''. Obviously, this confused Zle (but I do not know why). I thought, that I could pass parameter that says "do not set them" - and here you are! now my small widget really redisplays the input: (($#PREBUFFER)) && { zle .push-line-or-edit bla-bla-bla zle .get-line zle -R } with the sad problem, that it still thinks it is on PS2 and won't return to PS1 (even if I press ^L to redisplay the whole). That is, after bor@itsrm2:~%> { cursh> ESC-x foo-widget I get the following display bor@itsrm2:~%> { cursh> { <= cursor here and after ^L I get cursh> { <= cursor here Unforunately, here I am lost. I tried it with vanilla push-input/get-line with the same effect. Obviously, all of them just rely on zleread() to do the work ... sigh. /andrej