Git · BlameView: a run's name leaves out empty parts

This commit is contained in:
ZacharyZhang-NY committed 2026-10-07 02:13:37 -04:00
1 parent 68a98198b0
commit fcc45ccbd8
1 file changed
+8 -3
+8 -3
View File
@@ -182,9 +182,14 @@ impl RenderOnce for BlameView {
.text_size(theme.text_size(TextSize::Xs));
let gutter = match blame.clone().filter(|_| head) {
Some(blame) => {
let said: SharedString =
format!("{}, {} · {}", blame.author, blame.when, blame.subject)
.into();
// Empty parts, as for uncommitted lines, are left out.
let said: SharedString = [&blame.author, &blame.when, &blame.subject]
.into_iter()
.filter(|part| !part.is_empty())
.map(|part| part.as_ref())
.collect::<Vec<&str>>()
.join(", ")
.into();
let pick = on_commit.clone();
let commit = blame.commit.clone();
gutter