Fallback to filename for +arg (#9333)

pull/9341/head
jw013 10 months ago committed by GitHub
parent 17dd102e5c
commit 054ce3961a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -90,10 +90,9 @@ impl Args {
} }
} }
arg if arg.starts_with('+') => { arg if arg.starts_with('+') => {
let arg = &arg[1..]; match arg[1..].parse::<usize>() {
line_number = match arg.parse::<usize>() { Ok(n) => line_number = n.saturating_sub(1),
Ok(n) => n.saturating_sub(1), _ => args.files.push(parse_file(arg)),
_ => anyhow::bail!("bad line number after +"),
}; };
} }
arg => args.files.push(parse_file(arg)), arg => args.files.push(parse_file(arg)),

Loading…
Cancel
Save