- rl_bind_key(TAB, &CYConsoleKeyTab);
-
- rl_redisplay_function = CYDisplayUpdate;
- rl_prep_term_function = CYConsolePrepTerm;
-
-#if defined (__MSDOS__)
- rl_bind_keyseq("\033[0A", &CYConsoleKeyUp);
- rl_bind_keyseq("\033[0D", &CYConsoleKeyDown);
-#endif
- rl_bind_keyseq("\033[A", &CYConsoleKeyUp);
- rl_bind_keyseq("\033[B", &CYConsoleKeyDown);
- rl_bind_keyseq("\033OA", &CYConsoleKeyUp);
- rl_bind_keyseq("\033OB", &CYConsoleKeyDown);
-#if defined (__MINGW32__)
- rl_bind_keyseq("\340H", &CYConsoleKeyUp);
- rl_bind_keyseq("\340P", &CYConsoleKeyDown);
- rl_bind_keyseq("\\000H", &CYConsoleKeyUp);
- rl_bind_keyseq("\\000P", &CYConsoleKeyDown);
-#endif
+ if (cur_term != NULL) {
+ rl_redisplay_function = CYDisplayUpdate;
+ rl_prep_term_function = CYConsolePrepTerm;
+ }