change default escape timeout

This changes the default escape timeout for the default keybindings (emacs
mode) to 300ms and the default for vi keybindings to 10ms.

I couldn't resist fixing a few nits in the fish_vi_key_bindings.fish file
since I was touching it to set the escape timeout.
This commit is contained in:
Kurtis Rader
2016-01-31 17:37:51 -08:00
committed by ridiculousfish
parent e88bfbc440
commit 2646d51a0b
6 changed files with 168 additions and 142 deletions

View File

@@ -28,15 +28,10 @@ Implementation file for the low level input library
#include "env.h"
#include "iothread.h"
/**
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.
This is the value used by the readline library. It can be overridden by
setting the fish_escape_delay_ms variable.
*/
#define WAIT_ON_ESCAPE_DEFAULT 500
// 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
static int wait_on_escape_ms = WAIT_ON_ESCAPE_DEFAULT;
/** Characters that have been read and returned by the sequence matching code */