session: terminal-width
-> output-width
Rename the `--terminal-width` flag to `--output-width` as the behaviour doesn't just apply to terminals (and so is slightly less accurate). Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
parent
e5288842fa
commit
cd23af6793
31 changed files with 65 additions and 65 deletions
|
@ -63,7 +63,7 @@ impl HumanReadableErrorType {
|
|||
bundle: Option<Lrc<FluentBundle>>,
|
||||
fallback_bundle: LazyFallbackBundle,
|
||||
teach: bool,
|
||||
terminal_width: Option<usize>,
|
||||
output_width: Option<usize>,
|
||||
macro_backtrace: bool,
|
||||
) -> EmitterWriter {
|
||||
let (short, color_config) = self.unzip();
|
||||
|
@ -76,7 +76,7 @@ impl HumanReadableErrorType {
|
|||
short,
|
||||
teach,
|
||||
color,
|
||||
terminal_width,
|
||||
output_width,
|
||||
macro_backtrace,
|
||||
)
|
||||
}
|
||||
|
@ -710,7 +710,7 @@ pub struct EmitterWriter {
|
|||
short_message: bool,
|
||||
teach: bool,
|
||||
ui_testing: bool,
|
||||
terminal_width: Option<usize>,
|
||||
output_width: Option<usize>,
|
||||
|
||||
macro_backtrace: bool,
|
||||
}
|
||||
|
@ -730,7 +730,7 @@ impl EmitterWriter {
|
|||
fallback_bundle: LazyFallbackBundle,
|
||||
short_message: bool,
|
||||
teach: bool,
|
||||
terminal_width: Option<usize>,
|
||||
output_width: Option<usize>,
|
||||
macro_backtrace: bool,
|
||||
) -> EmitterWriter {
|
||||
let dst = Destination::from_stderr(color_config);
|
||||
|
@ -742,7 +742,7 @@ impl EmitterWriter {
|
|||
short_message,
|
||||
teach,
|
||||
ui_testing: false,
|
||||
terminal_width,
|
||||
output_width,
|
||||
macro_backtrace,
|
||||
}
|
||||
}
|
||||
|
@ -755,7 +755,7 @@ impl EmitterWriter {
|
|||
short_message: bool,
|
||||
teach: bool,
|
||||
colored: bool,
|
||||
terminal_width: Option<usize>,
|
||||
output_width: Option<usize>,
|
||||
macro_backtrace: bool,
|
||||
) -> EmitterWriter {
|
||||
EmitterWriter {
|
||||
|
@ -766,7 +766,7 @@ impl EmitterWriter {
|
|||
short_message,
|
||||
teach,
|
||||
ui_testing: false,
|
||||
terminal_width,
|
||||
output_width,
|
||||
macro_backtrace,
|
||||
}
|
||||
}
|
||||
|
@ -1615,7 +1615,7 @@ impl EmitterWriter {
|
|||
width_offset + annotated_file.multiline_depth + 1
|
||||
};
|
||||
|
||||
let column_width = if let Some(width) = self.terminal_width {
|
||||
let column_width = if let Some(width) = self.output_width {
|
||||
width.saturating_sub(code_offset)
|
||||
} else if self.ui_testing {
|
||||
DEFAULT_COLUMN_WIDTH
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue