Skip to content

Commit

Permalink
use CutInside.left/right, dropping unnecessary '_char' suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
deephbz committed Feb 11, 2025
1 parent f6379aa commit 5172cea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
5 changes: 1 addition & 4 deletions src/core_editor/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,7 @@ impl Editor {
EditCommand::CopySelectionSystem => self.copy_selection_to_system(),
#[cfg(feature = "system_clipboard")]
EditCommand::PasteSystem => self.paste_from_system(),
EditCommand::CutInside {
left_char,
right_char,
} => self.cut_inside(*left_char, *right_char),
EditCommand::CutInside { left, right } => self.cut_inside(*left, *right),
}
if !matches!(command.edit_type(), EditType::MoveCursor { select: true }) {
self.selection_anchor = None;
Expand Down
8 changes: 4 additions & 4 deletions src/edit_mode/vi/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@ impl Command {
},
Self::ChangeInsidePair { left, right } => {
vec![ReedlineOption::Edit(EditCommand::CutInside {
left_char: *left,
right_char: *right,
left: *left,
right: *right,
})]
}
Self::DeleteInsidePair { left, right } => {
vec![ReedlineOption::Edit(EditCommand::CutInside {
left_char: *left,
right_char: *right,
left: *left,
right: *right,
})]
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ pub enum EditCommand {
/// Delete text between matching characters atomically
CutInside {
/// Left character of the pair
left_char: char,
left: char,
/// Right character of the pair (usually matching bracket)
right_char: char,
right: char,
},
}

Expand Down

0 comments on commit 5172cea

Please sign in to comment.