Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

vim: Combine match arms in `Mode::is_visual` (#25675)

Marshall Bowersc53020ceafd3
diff --git a/crates/vim/src/state.rs b/crates/vim/src/state.rs
index a60082c9d04..b5ce364ae05 100644
--- a/crates/vim/src/state.rs
+++ b/crates/vim/src/state.rs
@@ -45,9 +45,8 @@ impl Display for Mode {
impl Mode {
pub fn is_visual(&self) -> bool {
match self {
- Mode::Normal | Mode::Insert | Mode::Replace => false,
- Mode::Visual | Mode::VisualLine | Mode::VisualBlock => true,
- Mode::HelixNormal => false,
+ Self::Visual | Self::VisualLine | Self::VisualBlock => true,
+ Self::Normal | Self::Insert | Self::Replace | Self::HelixNormal => false,
}
}
}