zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Highlight hook
Date: Sun, 27 Sep 2015 02:28:30 +0200	[thread overview]
Message-ID: <CAHYJk3QvRnYxLMb8XsoWB1hU92Qti_fEKt1JgxkyDARrhf1g7g@mail.gmail.com> (raw)

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


             reply	other threads:[~2015-09-27  0:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-27  0:28 Mikael Magnusson [this message]
2015-12-16  6:02 ` PATCH: Add zle-line-pre-redraw hook for highlighting Mikael Magnusson
2015-12-16  8:05   ` Bart Schaefer
2015-12-19  9:49     ` Daniel Shahaf
2016-01-10 22:17       ` m0viefreak
2016-01-11 15:26         ` Mikael Magnusson
2016-01-13  0:57           ` Daniel Shahaf

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=CAHYJk3QvRnYxLMb8XsoWB1hU92Qti_fEKt1JgxkyDARrhf1g7g@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=zsh-workers@zsh.org \
    /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).