Keep selection in SwitchToHelixNormalMode (#41583)
Closes #41125 Release Notes: - Fixed `SwitchToHelixNormalMode` to keep selection - Added default keybinds for `SwitchToHelixNormalMode` when in Helix mode
This commit is contained in:
@@ -66,12 +66,16 @@ impl Display for Mode {
|
||||
}
|
||||
|
||||
impl Mode {
|
||||
pub fn is_visual(&self) -> bool {
|
||||
pub fn is_visual(self) -> bool {
|
||||
match self {
|
||||
Self::Visual | Self::VisualLine | Self::VisualBlock | Self::HelixSelect => true,
|
||||
Self::Normal | Self::Insert | Self::Replace | Self::HelixNormal => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_helix(self) -> bool {
|
||||
matches!(self, Mode::HelixNormal | Mode::HelixSelect)
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Mode {
|
||||
@@ -990,7 +994,7 @@ pub struct SearchState {
|
||||
pub prior_selections: Vec<Range<Anchor>>,
|
||||
pub prior_operator: Option<Operator>,
|
||||
pub prior_mode: Mode,
|
||||
pub helix_select: bool,
|
||||
pub is_helix_regex_search: bool,
|
||||
}
|
||||
|
||||
impl Operator {
|
||||
|
||||
Reference in New Issue
Block a user