From b493ab8b9e91b0feafc15d67da5999b57f42d17c Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sat, 19 May 2007 09:13:56 +0300 Subject: [PATCH] UTF-8, update_screen_driver: Restore all original options. --- src/terminal/screen.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/terminal/screen.c b/src/terminal/screen.c index 4fdc7263..f27e6da0 100644 --- a/src/terminal/screen.c +++ b/src/terminal/screen.c @@ -256,6 +256,10 @@ update_screen_driver(struct screen_driver *driver, struct option *term_spec) const int cp = get_opt_codepage_tree(term_spec, "charset"); int utf8_io = get_opt_bool_tree(term_spec, "utf_8_io"); + /* Copy all the original options from constants, so that this + * function need not carefully restore options one by one. */ + copy_struct(&driver->opt, &screen_drivers[driver->type]->opt); + #ifdef CONFIG_UTF8 /* Force UTF-8 I/O if the UTF-8 charset is selected. Various * places assume that the terminal's charset is unibyte if