From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4869 invoked by alias); 27 Sep 2015 00:28:36 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36650 Received: (qmail 24732 invoked from network); 27 Sep 2015 00:28:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 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== MIME-Version: 1.0 X-Received: by 10.140.145.145 with SMTP id 139mr14925100qhr.100.1443313710213; Sat, 26 Sep 2015 17:28:30 -0700 (PDT) Date: Sun, 27 Sep 2015 02:28:30 +0200 Message-ID: Subject: Highlight hook From: Mikael Magnusson To: zsh workers Content-Type: text/plain; charset=UTF-8 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