From eef961e206e5562e5352c3041a5f87115e17098a Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Wed, 11 Oct 2006 21:13:43 +0200 Subject: [PATCH] Detection of UTF-8 mode doesn't work well on slave terminals. --- src/terminal/terminal.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c index e9860a77..3f872934 100644 --- a/src/terminal/terminal.c +++ b/src/terminal/terminal.c @@ -40,6 +40,7 @@ INIT_LIST_HEAD(terminals); static void check_if_no_terminal(void); +#if 0 static int was_utf8(int in, int out) { @@ -59,6 +60,7 @@ was_utf8(int in, int out) } return 1; } +#endif void redraw_terminal(struct terminal *term) @@ -115,10 +117,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(), term->fdout); } +#endif add_to_list(terminals, term); @@ -167,6 +171,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); @@ -174,6 +180,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); -- 2.11.4.GIT