From 7e2900511cfa8a41984144b1be03d8108abd8798 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Sat, 1 Nov 2014 01:02:46 +0100 Subject: [PATCH] window: initScreen: initialize readline this fixes segmentation fault in rl_resize_terminal on SIGWINCH. --- src/window.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/window.cpp b/src/window.cpp index 3dc0b220..6f730d94 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -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()