zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org (Zsh hackers list)
Subject: PATCH: zle-history-line-set hook
Date: Fri, 18 Feb 2011 22:29:58 +0000	[thread overview]
Message-ID: <18638.1298068198@pws-pc.ntlworld.com> (raw)

This is a good place to be able to do highlighting.

Index: Doc/Zsh/zle.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/zle.yo,v
retrieving revision 1.91
diff -p -u -r1.91 zle.yo
--- Doc/Zsh/zle.yo	18 Feb 2011 22:08:45 -0000	1.91
+++ Doc/Zsh/zle.yo	18 Feb 2011 22:29:04 -0000
@@ -923,6 +923,10 @@ item(tt(zle-line-finish))(
 This is similar to tt(zle-line-init) but is executed every time the
 line editor has finished reading a line of input.
 )
+tindex(zle-history-line-set)
+item(tt(zle-history-line-set))(
+Executed when the history line changes.
+)
 tindex(zle-keymap-select)
 item(tt(zle-keymap-select))(
 Executed every time the keymap changes, i.e. the special parameter
Index: Src/Zle/zle_hist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_hist.c,v
retrieving revision 1.67
diff -p -u -r1.67 zle_hist.c
--- Src/Zle/zle_hist.c	12 Dec 2010 22:44:51 -0000	1.67
+++ Src/Zle/zle_hist.c	18 Feb 2011 22:29:04 -0000
@@ -765,6 +765,7 @@ zle_setline(Histent he)
     histline = he->histnum;
 
     setline(GETZLETEXT(he), ZSL_COPY|ZSL_TOEND);
+    zlecallhook("zle-history-line-set", NULL);
     setlastline();
     clearlist = 1;
     if (remetafy)

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


                 reply	other threads:[~2011-02-18 22:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=18638.1298068198@pws-pc.ntlworld.com \
    --to=p.w.stephenson@ntlworld.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).