#[non_exhaustive]pub enum SelectionAction {
Duplicate(MoveDir1D, Count),
CursorSet(SelectionCursorChange),
Expand(SelectionBoundary, TargetShapeFilter),
Filter(bool),
Join,
Resize(SelectionResizeStyle, EditTarget),
Split(SelectionSplitStyle, TargetShapeFilter),
Trim(SelectionBoundary, TargetShapeFilter),
}Expand description
Actions for manipulating text selections.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Duplicate(MoveDir1D, Count)
Duplicate selections n times to adjacent lines in MoveDir1D direction.
If the column positions are too large to fit on the adjacent lines, then the next line large enough to hold the selection is used instead.
CursorSet(SelectionCursorChange)
Change the placement of the cursor and anchor of a visual selection.
Expand(SelectionBoundary, TargetShapeFilter)
Expand a selection by repositioning its cursor and anchor such that they are placed on the specified boundary.
Be aware that since this repositions the start and end of the selection, this may not do what you want with TargetShape::BlockWise selections.
Filter(bool)
Filter selections using the last regular expression entered for CommandType::Search.
The bool argument indicates whether we should drop selections that match instead of keeping them.
Join
Join adjacent selections together.
Resize(SelectionResizeStyle, EditTarget)
Change the bounds of the current selection as described by the style and target.
If the context doesn’t specify a selection shape, then the selection will determine its shape from the EditTarget.
Split(SelectionSplitStyle, TargetShapeFilter)
Split matching selections into multiple selections line.
All of the new selections are of the same shape as the one they were split from.
Trim(SelectionBoundary, TargetShapeFilter)
Shrink a selection by repositioning its cursor and anchor such that they are placed on the specified boundary.
Be aware that since this repositions the start and end of the selection, this may not do what you want with TargetShape::BlockWise selections.
Trait Implementations§
Source§impl Clone for SelectionAction
impl Clone for SelectionAction
Source§fn clone(&self) -> SelectionAction
fn clone(&self) -> SelectionAction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more