window: enable nonl and use raw terminal mode

master
Andrzej Rybczak 12 years ago
parent 322baa5989
commit fb0b2158e3
  1. 2
      src/ncmpcpp.cpp
  2. 4
      src/window.cpp
  3. 2
      src/window.h

@ -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

Loading…
Cancel
Save