diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c index 4a25bea2..265f9381 100644 --- a/src/terminal/terminal.c +++ b/src/terminal/terminal.c @@ -41,6 +41,7 @@ INIT_LIST_HEAD(terminals); static void check_if_no_terminal(void); +#if 0 static int was_utf8(int in, int out) { @@ -60,6 +61,7 @@ was_utf8(int in, int out) } return 1; } +#endif void redraw_terminal(struct terminal *term) @@ -116,10 +118,12 @@ init_term(int fdin, int fdout) term->spec = get_opt_rec(config_options, name); object_lock(term->spec); +#if 0 /* The hack to restore console in the right mode */ if (get_opt_int_tree(term->spec, "type") == TERM_LINUX) { - term->linux_was_utf8 = was_utf8(get_input_handle(), get_output_handle()); + term->linux_was_utf8 = was_utf8(get_input_handle(), term->fdout); } +#endif add_to_list(terminals, term); @@ -168,6 +172,8 @@ destroy_terminal(struct terminal *term) del_from_list(term); close(term->fdin); +#if 0 + /* This code doesn't work with slave terminals. */ if (get_opt_int_tree(term->spec, "type") == TERM_LINUX) { if (term->linux_was_utf8) { hard_write(term->fdout, "\033%G", 3); @@ -175,6 +181,7 @@ destroy_terminal(struct terminal *term) hard_write(term->fdout, "\033%@", 3); } } +#endif if (term->fdout != 1) { if (term->fdout != term->fdin) close(term->fdout);