Skip to content

Commit badfd26

Browse files
authored
diags: fix reporting lines on crlf files (#1036)
1 parent d012b39 commit badfd26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/workspace/src/reporting/files.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl WorkspaceFiles {
5656
.or_insert_with(|| {
5757
let source = file_id.read_to_string().unwrap_or_default();
5858
let line_starts = source
59-
.lines()
59+
.split('\n')
6060
.scan(0, |pos, line| {
6161
let start = *pos;
6262
*pos += line.len() + 1;

0 commit comments

Comments
 (0)