diff options
-rw-r--r-- | src/interface-curses.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/interface-curses.cpp b/src/interface-curses.cpp index eb44acb..0eba956 100644 --- a/src/interface-curses.cpp +++ b/src/interface-curses.cpp @@ -103,6 +103,17 @@ InterfaceCurses::main_impl(int &argc, char **&argv) { init_batch(); + /* + * We're in prog mode, so we must set it up + * now, even though we're also in SciTECO batch mode. + * This is because endwin() saves the prog mode + * and Curses restores it automatically. + */ + cbreak(); + noecho(); + /* Scintilla draws its own cursor */ + curs_set(0); + setlocale(LC_CTYPE, ""); /* for displaying UTF-8 characters properly */ info_window = newwin(1, 0, 0, 0); @@ -709,10 +720,6 @@ InterfaceCurses::event_loop_impl(void) */ init_interactive(); - cbreak(); - noecho(); - curs_set(0); /* Scintilla draws its own cursor */ - /* initial refresh */ /* FIXME: this does wrefresh() internally */ current_view->refresh(); |