Skip to content

Commit

Permalink
fix: index out of bounds when blaming a file ending with a blank line (
Browse files Browse the repository at this point in the history
  • Loading branch information
tdtrung17693 authored and IndianBoy42 committed Jun 4, 2024
1 parent d214056 commit e634cb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/popups/blame_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,8 @@ impl BlameFilePopup {
.iter()
.map(|l| l.1.clone())
.collect::<Vec<_>>();
let text = tabs_to_spaces(raw_lines.join("\n"));
let mut text = tabs_to_spaces(raw_lines.join("\n"));
text.push('\n');

job.spawn(AsyncSyntaxJob::new(
text,
Expand Down

0 comments on commit e634cb1

Please sign in to comment.