mirror of https://github.com/helix-editor/helix
style: fmt
parent
082ba4d741
commit
c101f37298
|
@ -261,15 +261,19 @@ impl EditorView {
|
||||||
|
|
||||||
// do not render inline blame for empty lines to reduce visual noise
|
// do not render inline blame for empty lines to reduce visual noise
|
||||||
if doc.text().line(cursor_line_idx) != doc.line_ending.as_str() {
|
if doc.text().line(cursor_line_idx) != doc.line_ending.as_str() {
|
||||||
if let Ok(line_blame) = doc.line_blame(cursor_line_idx as u32, &inline_blame.format)
|
if let Ok(line_blame) =
|
||||||
|
doc.line_blame(cursor_line_idx as u32, &inline_blame.format)
|
||||||
{
|
{
|
||||||
decorations.add_decoration(InlineBlame::new(
|
decorations.add_decoration(InlineBlame::new(
|
||||||
theme,
|
theme,
|
||||||
text_decorations::blame::LineBlame::OneLine((cursor_line_idx, line_blame)),
|
text_decorations::blame::LineBlame::OneLine((
|
||||||
|
cursor_line_idx,
|
||||||
|
line_blame,
|
||||||
|
)),
|
||||||
));
|
));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
InlineBlameBehaviour::AllLines => {
|
InlineBlameBehaviour::AllLines => {
|
||||||
let text = doc.text();
|
let text = doc.text();
|
||||||
let text_line_count = text.len_lines();
|
let text_line_count = text.len_lines();
|
||||||
|
@ -300,11 +304,12 @@ impl EditorView {
|
||||||
for (line_idx, blame) in blame_for_all_lines {
|
for (line_idx, blame) in blame_for_all_lines {
|
||||||
blame_lines[line_idx] = Some(blame);
|
blame_lines[line_idx] = Some(blame);
|
||||||
}
|
}
|
||||||
|
|
||||||
decorations.add_decoration(InlineBlame::new(
|
decorations.add_decoration(InlineBlame::new(
|
||||||
theme,
|
theme,
|
||||||
text_decorations::blame::LineBlame::ManyLines(blame_lines),
|
text_decorations::blame::LineBlame::ManyLines(blame_lines),
|
||||||
));
|
));
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue