From c3abc4386070d0db4f950ee8cb86e95efde332a8 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Wed, 23 Sep 2015 18:56:34 +0300 Subject: [PATCH] curses: Use set_escdelay when available --- lib/renderers/curses/curses.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/renderers/curses/curses.c b/lib/renderers/curses/curses.c index f0f654a..253089b 100644 --- a/lib/renderers/curses/curses.c +++ b/lib/renderers/curses/curses.c @@ -19,6 +19,10 @@ static const char *TTY = "CON"; static const char *TTY = "/dev/tty"; #endif +#if NCURSES_EXT_FUNCS < 20150808 +# define set_escdelay(x) ESCDELAY = (x) +#endif + static struct curses { WINDOW *stdscr; struct sigaction abrt_action; @@ -147,7 +151,7 @@ render(const struct bm_menu *menu) if ((curses.stdscr = initscr()) == NULL) return; - ESCDELAY = 25; + set_escdelay(25); flushinp(); keypad(curses.stdscr, true); curs_set(1);