@@ -333,8 +333,8 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
333 .hidden_short_help(true)
333 .hidden_short_help(true)
334 .validator(
334 .validator(
336− let sign = t.chars().next().unwrap();
336+ let is_offset = t.starts_with('+') || t.starts_with('-');
337− let num = if (sign == '+') || (sign == '-') {
337+ let num = if is_offset {
338 t.chars().skip(1).collect()
338 t.chars().skip(1).collect()
@@ -342,7 +342,7 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
343 num.parse::<u32>()
343 num.parse::<u32>()
344 .map_err(|_e| "must be an offset or number")
344 .map_err(|_e| "must be an offset or number")
345− .and_then(|v| if v == 0 && sign != '+' && sign != '-' {
345+ .and_then(|v| if v == 0 && !is_offset {
346 Err("terminal width cannot be zero".into())
346 Err("terminal width cannot be zero".into())