From d4276acab82fe2f2fdb2cfa0ccb4cb8c9d9248ca Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Thu, 17 Aug 2023 16:04:55 -0600 Subject: [PATCH] Give up on monospace indicator Changing mode almost always introduces the (1 selected) text in the status bar, so we may as well also keep the --'s for block and line mode. --- crates/vim/src/mode_indicator.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/vim/src/mode_indicator.rs b/crates/vim/src/mode_indicator.rs index 4b1ade7a223bf9ae5d647b7ce55c554bf2a8369e..b110c39dc46e7af59364628442bbc16588a0f4d0 100644 --- a/crates/vim/src/mode_indicator.rs +++ b/crates/vim/src/mode_indicator.rs @@ -80,15 +80,12 @@ impl View for ModeIndicator { let theme = &theme::current(cx).workspace.status_bar; - // we always choose text to be 12 monospace characters - // so that as the mode indicator changes, the rest of the - // UI stays still. let text = match mode { Mode::Normal => "-- NORMAL --", Mode::Insert => "-- INSERT --", Mode::Visual => "-- VISUAL --", - Mode::VisualLine => "VISUAL LINE", - Mode::VisualBlock => "VISUAL BLOCK", + Mode::VisualLine => "-- VISUAL LINE --", + Mode::VisualBlock => "-- VISUAL BLOCK --", }; Label::new(text, theme.vim_mode_indicator.text.clone()) .contained()