summaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorPeepNSheep2022-10-03 14:45:32 +0000
committerGitHub2022-10-03 14:45:32 +0000
commit77f33e7b20bb84c6506d745ce05ec6835eee6756 (patch)
tree198c0063a53ff7c919d12d2662438d9573dd4a15 /helix-term
parent589d17c7583716b339875b72972aaffe0ae5efc1 (diff)
Add configureable statusline mode names (#3311)
* Added 'long-mode' statusline element * Added customizable statusline mode names * Removed a string clone * Added documentation * Updated documentation, moved modenames to a seperate section * Update configuration.md * Documentation update * Documentation update * Documentation update * Update configuration.md * Update configuration.md * Fixed merge error * Update configuration.md * Update configuration.md
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/ui/statusline.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/helix-term/src/ui/statusline.rs b/helix-term/src/ui/statusline.rs
index 365e1ca9..9bbb268f 100644
--- a/helix-term/src/ui/statusline.rs
+++ b/helix-term/src/ui/statusline.rs
@@ -154,16 +154,16 @@ where
F: Fn(&mut RenderContext, String, Option<Style>) + Copy,
{
let visible = context.focused;
-
+ let modenames = &context.editor.config().statusline.mode;
write(
context,
format!(
" {} ",
if visible {
match context.editor.mode() {
- Mode::Insert => "INS",
- Mode::Select => "SEL",
- Mode::Normal => "NOR",
+ Mode::Insert => &modenames.insert,
+ Mode::Select => &modenames.select,
+ Mode::Normal => &modenames.normal,
}
} else {
// If not focused, explicitly leave an empty space instead of returning None.