Skip to content

Commit 99b9a38

Browse files
tdtrung17693extrawurst
authored andcommitted
fix: index out of bounds when blaming a file ending with a blank line (#2130)
1 parent baddec0 commit 99b9a38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/popups/blame_file.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,8 @@ impl BlameFilePopup {
572572
.iter()
573573
.map(|l| l.1.clone())
574574
.collect::<Vec<_>>();
575-
let text = tabs_to_spaces(raw_lines.join("\n"));
575+
let mut text = tabs_to_spaces(raw_lines.join("\n"));
576+
text.push('\n');
576577

577578
job.spawn(AsyncSyntaxJob::new(
578579
text,

0 commit comments

Comments
 (0)