vim: Fix some problems with visual mode testing (#8461)

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-02-26 20:15:27 -07:00 committed by GitHub
parent 079c31fcac
commit 8cf36ae603
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 43 additions and 25 deletions

View file

@ -41,14 +41,9 @@ impl Render for ModeIndicator {
return div().into_any();
};
let text = match mode {
Mode::Normal => "-- NORMAL --",
Mode::Insert => "-- INSERT --",
Mode::Visual => "-- VISUAL --",
Mode::VisualLine => "-- VISUAL LINE --",
Mode::VisualBlock => "-- VISUAL BLOCK --",
};
Label::new(text).size(LabelSize::Small).into_any_element()
Label::new(format!("-- {} --", mode))
.size(LabelSize::Small)
.into_any_element()
}
}