Subject: Re: PATCH: Add SHORT_KEYBIND_DISCARD option
From: Oliver Kiddle <[email-masked]>
To: zsh workers <[email-masked]>
Date: Thu, 07 Apr 2016 17:25:36 +0200
List-Id: Zsh Workers List <zsh-workers.zsh.org>

Mikael Magnusson wrote:
> > Didn't we discuss this issue a few months ago - have you perhaps got a
> > message reference?

I managed to find this again: users/20358 is a good reference where Bart
makes the point that this will have unpredictable effects for an unbound
function key. Some of the thread is in -workers.

We could make discarding the keys conditional upon whether KEYTIMEOUT
has elapsed since the prefix was received to account for that, however.

> I think I asked if doing what this patch does was possible, but I want
> it in general, not only because of bracketed-paste. If it were up to
> me, this way would be the only way. It doesn't really make any sense
> to me why we arbitrarily eat input just because it was a potential
> common prefix that then turned out to not be part of any actual
> keybinding. But since zsh people tend to like their things not
> changing, I did the option.

If get a prefixed key combination wrong, a beep seems cleaner than
getting the latter part inserted. 

> It just seems like a much more correct way of doing it to me.

But is it also proving an irritation in actual practice? Are you often
typing part of a long emacs-style binding and then being distracted by
something in another window, perhaps? Would a separate timeout after
which a prefix is discarded perhaps make sense?

Oliver