From c6901eaaa64597f313f31cbc781a5e2c53e9da37 Mon Sep 17 00:00:00 2001 From: hl-valdemar Date: Mon, 26 Oct 2026 15:31:38 +0100 Subject: [PATCH] fix: synchronize cursor and bar mode colors --- src/tui.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tui.rs b/src/tui.rs index 9841b2f..554de74 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -1298,7 +1298,7 @@ struct CursorAppearance { color: Option<[u8; 3]>, } -fn mode_cursor_color(mode: Mode) -> [u8; 3] { +fn mode_accent(mode: Mode) -> [u8; 3] { match mode { Mode::Normal => [95, 215, 255], Mode::Insert => [135, 215, 135], @@ -1320,7 +1320,7 @@ impl CursorAppearance { color: editor .cursor_config .mode_colors - .then(|| mode_cursor_color(editor.mode())), + .then(|| mode_accent(editor.mode())), } } } @@ -3381,7 +3381,7 @@ fn paint_editor_line( Style::default() .fg(Color::Black) .bg(if editor.cursor_config.mode_colors { - let [red, green, blue] = mode_cursor_color(editor.mode()); + let [red, green, blue] = mode_accent(editor.mode()); Color::Rgb(red, green, blue) } else { Color::Magenta