Skip to content

Commit

Permalink
Merge #1950
Browse files Browse the repository at this point in the history
1950: Limit text wrapping to 100 symbols by default r=pksunkara a=CreepySkeleton



Co-authored-by: CreepySkeleton <[email protected]>
  • Loading branch information
bors[bot] and CreepySkeleton authored May 30, 2020
2 parents 9af127a + d6603c7 commit 229cbbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/build/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,12 +608,12 @@ impl<'b> App<'b> {
self
}

/// Sets the terminal width at which to wrap help messages. Defaults to `120`. Using `0` will
/// Sets the terminal width at which to wrap help messages. Defaults to `100`. Using `0` will
/// ignore terminal widths and use source formatting.
///
/// `clap` automatically tries to determine the terminal width on Unix, Linux, OSX and Windows
/// if the `wrap_help` cargo "feature" has been used while compiling. If the terminal width
/// cannot be determined, `clap` defaults to `120`.
/// cannot be determined, `clap` defaults to `100`.
///
/// **NOTE:** This setting applies globally and *not* on a per-command basis.
///
Expand Down
2 changes: 1 addition & 1 deletion src/output/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl<'b, 'c, 'd, 'w> Help<'b, 'c, 'd, 'w> {
Some(0) => usize::MAX,
Some(w) => w,
None => cmp::min(
term_size::dimensions().map_or(120, |(w, _)| w),
term_size::dimensions().map_or(100, |(w, _)| w),
match parser.app.max_w {
None | Some(0) => usize::MAX,
Some(mw) => mw,
Expand Down

0 comments on commit 229cbbf

Please sign in to comment.