@@ -333,8 +333,8 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
333333 .hidden_short_help(true)
334334 .validator(
335335 |t| {
336− let sign = t.chars().next().unwrap();
337− let num = if (sign == '+') || (sign == '-') {
336+ let is_offset = t.starts_with('+') || t.starts_with('-');
337+ let num = if is_offset {
338338 t.chars().skip(1).collect()
339339 } else {
340340 t
@@ -342,7 +342,7 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
342342
343343 num.parse::<u32>()
344344 .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 {
346346 Err("terminal width cannot be zero".into())
347347 } else {
348348 Ok(())