]> Pileus Git - lackey/commitdiff
Set default escape key delay
authorAndy Spencer <andy753421@gmail.com>
Sun, 16 Jun 2013 04:40:38 +0000 (04:40 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sun, 16 Jun 2013 04:40:38 +0000 (04:40 +0000)
src/main.c

index d3fa34d2c1120d2624e20779e4cb9aca68d59695..3071fbff370d560711bbbda3a88759c4d645f118 100644 (file)
@@ -15,6 +15,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#define _XOPEN_SOURCE
+
 #include <stdlib.h>
 #include <signal.h>
 #include <locale.h>
@@ -46,6 +48,10 @@ int main(int argc, char **argv)
        /* Misc setup */
        signal(SIGINT, on_sigint);
 
+       /* Set default escape timeout */
+       if (!getenv("ESCDELAY"))
+               putenv("ESCDELAY=25");
+
        /* Setup Curses */
        setlocale(LC_ALL, "");
        initscr();