Reduce default escape delay

300ms was waaay too long, and even 100ms wasn't necessary.

Emacs' evil mode uses 10ms (0.01s), so let's stay a tad higher in case
some terminals are slow.

If anyone really wants to be able to type alt+h with escape, let them
raise the timeout.

Fixes #3904.
This commit is contained in:
Fabian Homborg
2019-02-07 12:08:24 +01:00
parent 1a3471fa7d
commit 7c8b444927
6 changed files with 13 additions and 31 deletions

View File

@@ -31,7 +31,7 @@
/// Time in milliseconds to wait for another byte to be available for reading
/// after \x1B is read before assuming that escape key was pressed, and not an
/// escape sequence.
#define WAIT_ON_ESCAPE_DEFAULT 300
#define WAIT_ON_ESCAPE_DEFAULT 30
static int wait_on_escape_ms = WAIT_ON_ESCAPE_DEFAULT;
/// Characters that have been read and returned by the sequence matching code.