zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "Bart Schaefer" <schaefer@candle.brasslantern.com>,
	"Sven Wischnowsky" <wischnow@informatik.hu-berlin.de>,
	<zsh-workers@sunsite.auc.dk>
Subject: Some help neede :-) RE: PS1 or PS2
Date: Wed, 7 Jul 1999 17:34:49 +0400	[thread overview]
Message-ID: <002301bec87d$7c1264c0$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <990629152431.ZM21113@candle.brasslantern.com>

>
> 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



  reply	other threads:[~1999-07-07 13:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-29 11:16 Sven Wischnowsky
1999-06-29 11:41 ` Andrej Borsenkow
1999-06-29 13:09   ` Andrej Borsenkow
1999-06-29 15:24     ` Bart Schaefer
1999-07-07 13:34       ` Andrej Borsenkow [this message]
1999-07-07 15:39         ` Some help neede :-) " Bart Schaefer

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='002301bec87d$7c1264c0$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=schaefer@candle.brasslantern.com \
    --cc=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).