@ -152,6 +152,8 @@ int main(int argc, char **argv)
# ifndef WIN32
signal(SIGPIPE, sighandler);
signal(SIGWINCH, sighandler);
// ignore Ctrl-C
sigignore(SIGINT);
# endif // !WIN32
while (!Actions::ExitMainLoop)
@ -375,10 +375,12 @@ void initScreen(GNUC_UNUSED const char *window_title, bool enable_colors)
for (int j = 0; j < 8; ++j)
init_pair(num++, ColorsTable[j], i < 0 ? i : ColorsTable[i]);
}
raw();
nonl();
noecho();
cbreak();
curs_set(0);
rl_catch_signals = 0;
rl_initialize();
// disable autocompletion
rl_bind_key('\t', nullptr);
@ -89,7 +89,7 @@
// KEY_ENTER is 343, which doesn't make any sense. This makes it useful.
#undef KEY_ENTER
#define KEY_ENTER 10
#define KEY_ENTER 13
// undefine scroll macro as it collides with Window::scroll
#undef scroll