zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh workers <zsh-workers@zsh.org>
Subject: Re: IMO zle-line-pre-redraw is called much too often
Date: Thu, 4 Feb 2016 16:51:07 +0100	[thread overview]
Message-ID: <CAHYJk3T-6rNne6g13PCwn9zFJqsBqsNeQHokrp7iRBwYAWW9dA@mail.gmail.com> (raw)
In-Reply-To: <160204074103.ZM25984@torch.brasslantern.com>

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


      reply	other threads:[~2016-02-04 15:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-04 15:41 Bart Schaefer
2016-02-04 15:51 ` Mikael Magnusson [this message]

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=CAHYJk3T-6rNne6g13PCwn9zFJqsBqsNeQHokrp7iRBwYAWW9dA@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=schaefer@brasslantern.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).