zsh-workers
 help / color / mirror / code / Atom feed
From: Andrej Borsenkow <borsenkow.msk@sni.de>
To: Zefram <zefram@dcs.warwick.ac.uk>
Cc: zsh-workers@math.gatech.edu
Subject: Re: Qustions about ZLE widgets.
Date: Wed, 11 Jun 1997 09:41:05 +0400 (MSD)	[thread overview]
Message-ID: <Pine.SV4.3.95.970611093303.971B-100000@itsrm1> (raw)
In-Reply-To: <6793.199706101412@stone.dcs.warwick.ac.uk>

On Tue, 10 Jun 1997, Zefram wrote:

> Andrej Borsenkow wrote:
> >dup_characters () {
> >	local char
> >	BUFFER="" 
> >	read -k char
> 
> I do not recommend using `read' in a widget function.  I expect it will
> screw up the tty mode.  When I find the time to implement it, there will
> be a proper way to input characters within ZLE.  (It would be nice to
> make read safe to call from within ZLE anyway.)
>

Yes, thanks. As long as I don't use read, it works quite well (but note,
man to zle builtuin doesn't place any restrictions on what widget function
can do). What happens, when functions calls some external program which
changes tty mode? May be, ZLE has to restore tty settings (and buffer)
after user defined widget exits? 

> >	BUFFER="$BUFFER""$char""$char" 
> 
> "$BUFFER" is guaranteed to be empty at this point, as you cleared
> it above.  Is this what you intend?
> 

Ohh ... I started with something more elanorate, but as it didn't work, I
cut it down to above example. Sorry, looks silly, I know ... :-(

thanx

-------------------------------------------------------------------------
Andrej Borsenkow 		Fax:   +7 (095) 252 01 05
SNI ITS Moscow			Tel:   +7 (095) 252 13 88

NERV:  borsenkow.msk		E-Mail: borsenkow.msk@sni.de
-------------------------------------------------------------------------



      reply	other threads:[~1997-06-11  5:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-10 13:23 Andrej Borsenkow
1997-06-10 14:12 ` Zefram
1997-06-11  5:41   ` Andrej Borsenkow [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.SV4.3.95.970611093303.971B-100000@itsrm1 \
    --to=borsenkow.msk@sni.de \
    --cc=zefram@dcs.warwick.ac.uk \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).