window: initScreen: initialize readline

this fixes segmentation fault in rl_resize_terminal on SIGWINCH.
This commit is contained in:
Andrzej Rybczak
2014-11-01 01:02:46 +01:00
parent a71f3787d1
commit 7e2900511c

View File

@@ -439,6 +439,9 @@ void initScreen(GNUC_UNUSED const char *window_title, bool enable_colors)
rl_getc_function = rl::read_key;
rl_redisplay_function = rl::display_string;
rl_startup_hook = rl::add_base;
// initialize readline (needed, otherwise
// we get segmentation fault on SIGWINCH).
rl_initialize();
}
void destroyScreen()