zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: Vimode problem (key press dropping)
Date: Wed, 29 Jul 2015 16:14:52 +0200	[thread overview]
Message-ID: <11402.1438179292@thecus.kiddle.eu> (raw)
In-Reply-To: <B709D83B-0F41-42B7-B17D-01D5AB7572CC@kba.biglobe.ne.jp>

"Jun T." wrote:
> 
> On 2015/07/29, at 18:26, Oliver Kiddle <okiddle@yahoo.co.uk> wrote:
> > 
> > Question to -workers subscribers: how should we address this in the
> > defaults?
> 
> In zle_keymap.c, near line 1493, timeout is set only if
> (f != t_undefinedkey). But ESC is an undefinedkey in vicmd keymap,
> and the timeout remains to be zero even if ispfx is true.

I don't think this helps because where the prefix is an individual key
typed by the user, they are then forced to type the following character
in the sequence faster than KEYTIMEOUT. And if something like <Escape>a
is typed too fast from vi-mode, it would still be thrown out as a whole.
Taking the default emacs bindings, Ctrl-X is a prefix but we don't
want a timeout after Ctrl-X because it is the user typing followup
characters.

Mikael wrote:
> I always felt like how it should work if we get the string "abc", is
> first abc is looked up and we find it isn't bound to anything, the a
> gets treated as a separate input string, then we look up bc instead,
> etc. What we do now is just discard the whole string as
> "undefined-key".

The current behaviour where the whole sequence is thrown out is
consistent with emacs. I think it makes sense for the typical emacs case
if you make a mistake with a manual sequence. We can't really
special-case escape because manual sequences with escape are also common
in emacs mode. Binding escape in vi command mode does, however, solve
it.

Oliver


  reply	other threads:[~2015-07-29 14:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5d9984411ba10dee4321a408e2763317@riseup.net>
     [not found] ` <9361.1438161965@thecus.kiddle.eu>
2015-07-29 10:51   ` Jun T.
2015-07-29 14:14     ` Oliver Kiddle [this message]
2015-07-29 15:31       ` Jun T.
2015-07-29 15:22   ` Bart Schaefer
2015-08-10 12:34     ` Oliver Kiddle

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=11402.1438179292@thecus.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --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).