zsh-users
 help / color / mirror / code / Atom feed
* Cannot tell why POSTDISPLAY doesn't work
@ 2018-06-05 14:50 Sebastian Gniazdowski
  2018-06-08 14:38 ` Sebastian Gniazdowski
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Gniazdowski @ 2018-06-05 14:50 UTC (permalink / raw)
  To: Zsh Users

Hello,
I can use zle -M to show messages from zle widget. It's wrapped normal
widget, wrapping done by syntax-highlighting, and from the wrapping
code zle -M is called.

But if I try to use POSTDISPLAY, it doesn't work, no message under
prompt is shown. Any idea why?

Tried:  POSTDISPLAY=$'\n'"Test"
-- 
Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Cannot tell why POSTDISPLAY doesn't work
  2018-06-05 14:50 Cannot tell why POSTDISPLAY doesn't work Sebastian Gniazdowski
@ 2018-06-08 14:38 ` Sebastian Gniazdowski
  2018-06-08 15:10   ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Gniazdowski @ 2018-06-08 14:38 UTC (permalink / raw)
  To: Zsh Users

Some more data on this, POSTDISPLAY works, but only *sometimes*

https://asciinema.org/a/uDM5oznmrNWXfg78j7T3QqNVr

On 5 June 2018 at 16:50, Sebastian Gniazdowski <sgniazdowski@gmail.com> wrote:
> Hello,
> I can use zle -M to show messages from zle widget. It's wrapped normal
> widget, wrapping done by syntax-highlighting, and from the wrapping
> code zle -M is called.
>
> But if I try to use POSTDISPLAY, it doesn't work, no message under
> prompt is shown. Any idea why?
>
> Tried:  POSTDISPLAY=$'\n'"Test"
> --
> Best regards,
> Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Cannot tell why POSTDISPLAY doesn't work
  2018-06-08 14:38 ` Sebastian Gniazdowski
@ 2018-06-08 15:10   ` Peter Stephenson
  2018-06-08 15:23     ` Sebastian Gniazdowski
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 2018-06-08 15:10 UTC (permalink / raw)
  To: Zsh Users

On Fri, 8 Jun 2018 16:38:43 +0200
Sebastian Gniazdowski <sgniazdowski@gmail.com> wrote:
> On 5 June 2018 at 16:50, Sebastian Gniazdowski
> <sgniazdowski@gmail.com> wrote:
> > Hello,
> > I can use zle -M to show messages from zle widget. It's wrapped
> > normal widget, wrapping done by syntax-highlighting, and from the
> > wrapping code zle -M is called.
> >
> > But if I try to use POSTDISPLAY, it doesn't work, no message under
> > prompt is shown. Any idea why?
>
> Some more data on this, POSTDISPLAY works, but only *sometimes*

Actually, that's an accident.

"zle -M" *simply* prints a message.  It doesn't interact with
the normal editing buffer at all (which is the thing to which
POSTDISPLAY is appended).  So if you're seeing it it's because it's
not overridden by the message.

It's worth scanning the zshzle manual to see if you're doing something
that might be better dealt with by Zle -R, which does a normal
redisplay with an optional message --- this is commonly the case
when within widgets.

pws


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Cannot tell why POSTDISPLAY doesn't work
  2018-06-08 15:10   ` Peter Stephenson
@ 2018-06-08 15:23     ` Sebastian Gniazdowski
  0 siblings, 0 replies; 4+ messages in thread
From: Sebastian Gniazdowski @ 2018-06-08 15:23 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh Users

On 8 June 2018 at 17:10, Peter Stephenson <p.stephenson@samsung.com> wrote:
> "zle -M" *simply* prints a message.  It doesn't interact with
> the normal editing buffer at all (which is the thing to which
> POSTDISPLAY is appended).  So if you're seeing it it's because it's
> not overridden by the message.
>
> It's worth scanning the zshzle manual to see if you're doing something
> that might be better dealt with by Zle -R, which does a normal
> redisplay with an optional message --- this is commonly the case
> when within widgets.

I just realized it is zsh-users/zsh-autosuggestions is also using
POSTDISPLAY. When I enter weird command with "-" in the middle, then
zsh-autosuggestions doesn't have any string to suggest and doesn't
touch my POSTDISPLAY. Now how to dig out from this. I've tried zle -R
but it doesn't help.

-- 
Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-08 15:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-05 14:50 Cannot tell why POSTDISPLAY doesn't work Sebastian Gniazdowski
2018-06-08 14:38 ` Sebastian Gniazdowski
2018-06-08 15:10   ` Peter Stephenson
2018-06-08 15:23     ` Sebastian Gniazdowski

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