Remove --width from CLI parameters

This is the first step in refactoring for inline diffs.
ida_star
Wilfred Hughes 2021-08-01 15:30:05 +07:00
parent 7a61048056
commit 1ceaecfa25
2 changed files with 5 additions and 10 deletions

@ -20,6 +20,10 @@ delimiter over a delimiter that gave contiguous changes.
Display width calculations are now based on the longest line visible
in the diff, not the longest line in the file.
### Command Line Interface
Removed the `--width` argument.
## 0.6
### Parsing

@ -70,12 +70,6 @@ fn main() {
.takes_value(true)
.help("Override the language parser"),
)
.arg(
Arg::with_name("COLUMNS")
.long("width")
.takes_value(true)
.help("Override terminal width"),
)
.arg(Arg::with_name("positional_args").multiple(true))
.setting(AppSettings::ArgRequiredElseHelp)
.get_matches();
@ -122,10 +116,7 @@ fn main() {
.to_string()
.replace("\t", " ");
let terminal_width = match matches.value_of("COLUMNS") {
Some(width) => width.parse::<usize>().unwrap(),
None => term_width().unwrap_or(80),
};
let terminal_width = term_width().unwrap_or(80);
let arena = Arena::new();