Do not try to set box=unicode if the driver is not the text driver.
authorJohn Darrington <john@darrington.wattle.id.au>
Wed, 24 Apr 2013 16:00:09 +0000 (18:00 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Wed, 24 Apr 2013 16:00:09 +0000 (18:00 +0200)
src/ui/terminal/terminal-opts.c

index 45c503eecacc596c733a780ba7e754e5270c1e14..da69afb508f86d9caf8477e25cce97bfcfd65e2d 100644 (file)
@@ -319,16 +319,16 @@ term_is_utf8_xterm (void)
 void
 terminal_opts_done (struct terminal_opts *to, int argc, char *argv[])
 {
-  if ((0 == strcmp (locale_charset (), "UTF-8"))
-      ||
-      (term_is_utf8_xterm ()) )
-    {
-      string_map_insert (&to->options, "box", "unicode");
-    }
-  
   register_output_driver (to);
   if (!to->has_output_driver)
     {
+      if ((0 == strcmp (locale_charset (), "UTF-8"))
+         ||
+         (term_is_utf8_xterm ()) )
+       {
+         string_map_insert (&to->options, "box", "unicode");
+       }
+  
       string_map_insert (&to->options, "output-file", "-");
       string_map_insert (&to->options, "format", "txt");
       register_output_driver (to);