vim: Combine match arms in Mode::is_visual
(#25675)
This PR refactors the `Mode::is_visual` implementation to combine some of the `match` arms. Release Notes: - N/A
This commit is contained in:
parent
eeac1a9287
commit
c53020ceaf
1 changed files with 2 additions and 3 deletions
|
@ -45,9 +45,8 @@ impl Display for Mode {
|
||||||
impl Mode {
|
impl Mode {
|
||||||
pub fn is_visual(&self) -> bool {
|
pub fn is_visual(&self) -> bool {
|
||||||
match self {
|
match self {
|
||||||
Mode::Normal | Mode::Insert | Mode::Replace => false,
|
Self::Visual | Self::VisualLine | Self::VisualBlock => true,
|
||||||
Mode::Visual | Mode::VisualLine | Mode::VisualBlock => true,
|
Self::Normal | Self::Insert | Self::Replace | Self::HelixNormal => false,
|
||||||
Mode::HelixNormal => false,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue