Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Cannot tell why POSTDISPLAY doesn't work



On Fri, 8 Jun 2018 16:38:43 +0200
Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> wrote:
> On 5 June 2018 at 16:50, Sebastian Gniazdowski
> <sgniazdowski@xxxxxxxxx> 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



Messages sorted by: Reverse Date, Date, Thread, Author