mirror of https://github.com/helix-editor/helix
refactor: `match` over `if`
parent
ab5663891c
commit
082ba4d741
|
@ -254,7 +254,9 @@ impl EditorView {
|
||||||
decorations: &mut DecorationManager,
|
decorations: &mut DecorationManager,
|
||||||
theme: &Theme,
|
theme: &Theme,
|
||||||
) {
|
) {
|
||||||
if inline_blame.behaviour == InlineBlameBehaviour::CursorLine {
|
match inline_blame.behaviour {
|
||||||
|
InlineBlameBehaviour::Hidden => (),
|
||||||
|
InlineBlameBehaviour::CursorLine => {
|
||||||
let cursor_line_idx = doc.cursor_line(view.id);
|
let cursor_line_idx = doc.cursor_line(view.id);
|
||||||
|
|
||||||
// do not render inline blame for empty lines to reduce visual noise
|
// do not render inline blame for empty lines to reduce visual noise
|
||||||
|
@ -267,7 +269,8 @@ impl EditorView {
|
||||||
));
|
));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} else if inline_blame.behaviour == 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();
|
||||||
let view_height = view.inner_height();
|
let view_height = view.inner_height();
|
||||||
|
@ -301,6 +304,7 @@ impl EditorView {
|
||||||
theme,
|
theme,
|
||||||
text_decorations::blame::LineBlame::ManyLines(blame_lines),
|
text_decorations::blame::LineBlame::ManyLines(blame_lines),
|
||||||
));
|
));
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue