Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Highlight hook
- X-seq: zsh-workers 36650
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Highlight hook
- Date: Sun, 27 Sep 2015 02:28:30 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=3nXKOXwXb1MZfY9c2gJDOYHs6qfnstm9icWtz8CvhoY=; b=A9fTiNH2bDLdTTOEttr7PSbkhZDBiKJgVRa+p8R8LFKVtCnM064d73mL73KxCUfjCB rTSrYUpKK2/IC9n4HBmM8nutmymxnRtcvWryQ4qAjfWkAp/+yNfJvMExD8cmfOeAXIWI 8JXdHrirjFTt2jgKcUHnk5jjdHJS0Hs6N0zk87PYzPB0xwgdx3mrXlEqu0MKLpal+30N xkeKDaxYkmOhBhGLGELLSo/pxcKj43XzuNdQCqx+UyHTgStOqdObfbYzhZxM1I+awWTh h6LcYe8tuLOhNKktfHqqFMubD71k32A82EE0EvyapsFddsVJ2zcWQsLG+OwMd1nOUID7 hiTQ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
I've pushed a branch (mikachu/redrawhook) that adds a hook called
zle-line-pre-redraw (maybe not the best name). This is called whenever
the line is edited or the cursor moves (hopefully). As you may spot
from the first commit date, I've used this for a while. There were
some problems with calling it from inside zrefresh() (not to mention
how inefficient that is with how often zrefresh() gets called), but so
far none of those have showed up with where I call it now.
If there are no major problems with this, it might be nice for the
highlighters to not have to wrap every single widget in zsh to call
the highlighting when the line changes, since that also has other side
effects.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author