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

z-sy-h and z-asug: zle-line-pre-redraw, POSTDISPLAY, coexistence (was: Re: emulate bash key bindings)

Roman Perepelitsa wrote on Fri, 10 Jan 2020 17:35 +00:00:
> If I may make a suggestion, perhaps zsh-syntax-highlighting shouldn't
> remove highlighting from POSTDISPLAY? zsh-autosuggestions owns
> POSTDISPLAY area while zsh-syntax-highlighting owns BUFFER. zsh-
> autosuggestions doesn't touch highlighting of BUFFER, which allows it
> to peacefully coexist with syntax highlighting plugins. If zsh-syntax-
> highlighting did the same w.r.t. POSTDISPLAY highlighting, there would
> be no widget-wrapping-order dependencies and feature/redrawhook
> wouldn't introduce breaking changes for users who rely on both of
> these great plugins.
> Just my 2 cents. I hope it makes at least some sense.

It does make sense.  Nothing in z-sy-h highlights $POSTDISPLAY, so z-sy-h
should coexist with plugins that do.  The catch is that making the
change will make it difficult to write a z-sy-h highlighter that handles
PREDISPLAY and/or POSTDISPLAY, should anyone ever want to do that.
(But if I have to choose between support for hypothetical future highlighters
and interoperability with z-asug today, I'll choose the latter.)

Might you be interested in writing a PR?



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