Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) 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.1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :cc:content-type;
        bh=mRCz/Q3YuChUgGrzA7EWDKwPmNLnpdc6M1xfME2NJes=;
        b=VJUN7kb2JAjlTQDsKC/jZQDtZDNdiriCFFCzuqxIp10lh0toYFjHDQpNDUx6U7kH1q
         SRDod2Tb0H8Et13JeA5bPmOaR+ZJQA49+/OhCc2en3JlRiM01ECsooJomrUb2xaoN2jJ
         0gqnYwxvmVCPM7JYbGYXZFIv5dVRYF8GkokvtI4PuCvL/S1SM19ZSwwU4PrcFfnyXm5e
         l3HbByjVLy1/2T7MC+dkIkGZ1jmF6WECTlZ5ukW9hSIYBHYSD/mIecr+FLHyjIgiiDvn
         sTIJ0u73eomgwpOMW1NAcCB8lbQaahhUhCs3UKKhGr+A5OLzLnBBmA6DFyNAVazz1Uyv
         mOHg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:date
         :message-id:subject:from:to:cc:content-type;
        bh=mRCz/Q3YuChUgGrzA7EWDKwPmNLnpdc6M1xfME2NJes=;
        b=fdbWWaBjFJdBZe/+4d8f0AbZK+V6V29RsG/1/hzRk7/W/DhdDL7bSRIDWSXUAKKo1W
         k7NxZ7Lr87lA/t/5zwcOB42I+AGGzbK/isUVtFKCx73OWbSBB81eGzPu+Bv+x/OsjtJF
         rpztD/vVktY4/Htole1DliR2GrBDfBGrijwA2LxHi79Mv3GYk27AfFJ5/EqZ7BLi/jrA
         FHaj0T/58Qcz9Lq0tzuCyzO4ohq+nZI/X1AvZWyFS5ke7kw9iyup8cDLyKbVJcKv4Aks
         uhKY2E9rO5GGz+8tr5c6zxFm2lej8LFwj2yXQ0w7uQmiaCvjEaKRYs/S+6l/H75ErGVh
         Hciw==
X-Gm-Message-State: AG10YOSyz4X6wxTsSLiVxxFD3B3wOtcWt3jxVlVxf8qwMXimKhReCcpIt/IvrJCmKq0ur2VdUUI/EqchIEUjnQ==
MIME-Version: 1.0
X-Received: by 10.140.224.198 with SMTP id u189mr5046038qhb.58.1454601067699;
 Thu, 04 Feb 2016 07:51:07 -0800 (PST)
In-Reply-To: <160204074103.ZM25984@torch.brasslantern.com>
References: <160204074103.ZM25984@torch.brasslantern.com>
Date: Thu, 4 Feb 2016 16:51:07 +0100
Message-ID: <CAHYJk3T-6rNne6g13PCwn9zFJqsBqsNeQHokrp7iRBwYAWW9dA@mail.gmail.com>
Subject: Re: IMO zle-line-pre-redraw is called much too often
From: Mikael Magnusson <mikachu@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh workers <zsh-workers@zsh.org>
Content-Type: text/plain; charset=UTF-8
X-Seq: zsh-workers 37881

On Thu, Feb 4, 2016 at 4:41 PM, Bart Schaefer <schaefer@brasslantern.com> wrote:
> I was a little skeptical of this when it was added, but having just tried
> a couple of experiments with it I'm unhappy with the implementation.  It
> is called at every self-insert, for example.
>
> There has to be a more reasonable compromise.

Do you propose the code should diff the old and the new input + cursor
position to find out if it's different, and only call it in that case?
Because that doesn't sound like any fun to me. It also seems highly
unlikely to me that a self-insert does _not_ result in a new output,
so when would the hook ever not be called in this case?

-- 
Mikael Magnusson

