Skip to content

Commit c623448

Browse files
committed
always use new_index
my manual tests had always had an equal number of insertions and deletions, so I didn't notice this. if you use old_index here then you end up with duplicate line numbers for any pure insertion, such as adding a required import
1 parent 6a93de8 commit c623448

File tree

1 file changed

+1
-1
lines changed
  • crates/ruff_db/src/diagnostic/render

1 file changed

+1
-1
lines changed

crates/ruff_db/src/diagnostic/render/full.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ impl std::fmt::Display for Diff<'_> {
151151
"|",
152152
self.stylesheet.none,
153153
self.stylesheet.line_no,
154-
change.old_index(),
154+
change.new_index(),
155155
),
156156
};
157157

0 commit comments

Comments
 (0)