- if (msg_file != stdout || get_error_routing_to_terminal ())
- dump_message (ds_cstr (&string), get_viewwidth (), 8,
+ if (msg_file != stdout || settings_get_error_routing_to_terminal ())
+ dump_message (ds_cstr (&string),
+ isatty (fileno (msg_file)) ? settings_get_viewwidth () : INT_MAX, 8,