mirror of https://github.com/helix-editor/helix
refactor(statusline): ensure the match is exhaustive
parent
f3513a6526
commit
18435dc4c5
|
@ -163,12 +163,15 @@ impl StatusLine {
|
||||||
context,
|
context,
|
||||||
format!(
|
format!(
|
||||||
" {} ",
|
" {} ",
|
||||||
|
if visible {
|
||||||
match context.doc.mode() {
|
match context.doc.mode() {
|
||||||
Mode::Insert if visible => "INS",
|
Mode::Insert => "INS",
|
||||||
Mode::Select if visible => "SEL",
|
Mode::Select => "SEL",
|
||||||
Mode::Normal if visible => "NOR",
|
Mode::Normal => "NOR",
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// If not focused, explicitly leave an empty space instead of returning None.
|
// If not focused, explicitly leave an empty space instead of returning None.
|
||||||
_ => " ",
|
" "
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
None,
|
None,
|
||||||
|
|
Loading…
Reference in New Issue