On Wed, Jun 04, 2014 at 08:47:42PM -0400, Stefan Monnier wrote: > >> > Curses applications behave differently if you type those > >> > three characters, one-by-one, because of timing. > >> We try pretty hard to avoid using such timeouts in Emacs, so by and > >> large this doesn't apply to Emacs at all. > > As it happens, that rule of thumb doesn't apply to terminals: > > https://github.com/mirrors/emacs/blob/master/src/keyboard.c > > (it's implemented there, at any rate) > > Where do you see the timeouts? start with static bool get_input_pending (int); The code's waiting for a while to ensure that it gets all of the bytes in a cursor-key/function-key/mouse-event sequence. > Or rather, no, don't bother, because even there might be problem in how > we process the input escape sequences, these are unrelated to the > display glitches we see. So let's focus on the display glitches. You could cut the discussion short by making the check that I suggested: logging the decoded character/special-key values to look for instances where the decoding returns individual bytes. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net