Fix bug when launching hx file.rs:10 (#1676)

This commit is contained in:
tomKPZ 2022-02-17 19:13:02 -08:00 committed by GitHub
parent afec54485a
commit 368064e316
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,7 +82,7 @@ fn split_path_row_col(s: &str) -> Option<(PathBuf, Position)> {
///
/// Does not validate if file.rs is a file or directory.
fn split_path_row(s: &str) -> Option<(PathBuf, Position)> {
let (row, path) = s.rsplit_once(':')?;
let (path, row) = s.rsplit_once(':')?;
let row: usize = row.parse().ok()?;
let path = path.into();
let pos = Position::new(row.saturating_sub(1), 0);