ncurses: specify ESCDELAY after setting locale

Otherwise the locale change is ignored on some systems
This commit is contained in:
Alexandre Bury 2017-05-23 15:22:18 -07:00
parent d031d3784a
commit db0398ec81

View File

@ -14,8 +14,8 @@ impl backend::Backend for Concrete {
// The delay is the time ncurses wait after pressing ESC
// to see if it's an escape sequence.
// Default delay is way too long. 25 is imperceptible yet works fine.
::std::env::set_var("ESCDELAY", "25");
ncurses::setlocale(ncurses::LcCategory::all, "");
::std::env::set_var("ESCDELAY", "25");
ncurses::initscr();
ncurses::keypad(ncurses::stdscr(), true);
ncurses::noecho();