Loading ...
Sorry, an error occurred while loading the content.

9155Re: Does MacVim drop characters?

Expand Messages
  • björn
    Oct 2, 2008
    • 0 Attachment
      2008/10/2 Jonathon Mah <me@...>:
      >>>
      >>> That sounds like you'd be implementing that behavior on the back-end.
      >>> How would that handle the case of repeating a key, and then pressing
      >>> another key?
      >>
      >> I don't see the problem. If a key is pressed while another is
      >> repeating, the repeating key will stop repeating. Did I miss
      >> something?
      >
      > I haven't looked at your patch yet, but the situation I was thinking
      > about is when a key is repeated (so there are keypresses in the queue
      > that haven't been drawn yet), and a different key is pressed. The
      > first key is no longer repeating, but its past repeats could still be
      > queued. Think holding down 'j', so a lot of scroll events are queued,
      > then hitting 'o'. When the 'o' event comes in, should the queued-but-
      > not-drawn scroll commands be discarded?

      The way it works now is:

      1. input arrives
      2. is it a repeat?
      2a. yes - queue it unless there already is input on the queue (in
      which case it is silently dropped)
      2b. no - just add it to the queue

      The idea is that the user won't notice if a repeated key is dropped
      but a typed key will most certainly be noticed. Also, the input
      handling routine does not distinguish between key input representing
      "scrolling" and "typing" (this would be a complete mess).

      Hence there will never be more than one repeated key on the input
      queue at a time so the scenario you outline cannot happen.

      Björn

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Show all 16 messages in this topic