keymap: Update Prev
to Previous
follow-up (#25931)
Follow-up for https://github.com/zed-industries/zed/pull/25909 Add three more action replacements: ``` 1. "pane::ActivatePrevItem" -> "pane::ActivatePreviousItem" 2. "vim::MoveToPrev" -> "vim::MoveToPrevious" 3. "vim:MoveToPrevMatch" -> "vim:MoveToPreviousMatch" ``` Release Notes: - N/A
This commit is contained in:
parent
466be14b56
commit
8bb2739e28
12 changed files with 42 additions and 34 deletions
|
@ -28,7 +28,7 @@ pub(crate) struct MoveToNext {
|
|||
|
||||
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub(crate) struct MoveToPrev {
|
||||
pub(crate) struct MoveToPrevious {
|
||||
#[serde(default = "default_true")]
|
||||
case_sensitive: bool,
|
||||
#[serde(default)]
|
||||
|
@ -67,15 +67,15 @@ pub(crate) struct Replacement {
|
|||
is_case_sensitive: bool,
|
||||
}
|
||||
|
||||
actions!(vim, [SearchSubmit, MoveToNextMatch, MoveToPrevMatch]);
|
||||
impl_actions!(vim, [FindCommand, Search, MoveToPrev, MoveToNext]);
|
||||
actions!(vim, [SearchSubmit, MoveToNextMatch, MoveToPreviousMatch]);
|
||||
impl_actions!(vim, [FindCommand, Search, MoveToPrevious, MoveToNext]);
|
||||
impl_internal_actions!(vim, [ReplaceCommand]);
|
||||
|
||||
pub(crate) fn register(editor: &mut Editor, cx: &mut Context<Vim>) {
|
||||
Vim::action(editor, cx, Vim::move_to_next);
|
||||
Vim::action(editor, cx, Vim::move_to_prev);
|
||||
Vim::action(editor, cx, Vim::move_to_previous);
|
||||
Vim::action(editor, cx, Vim::move_to_next_match);
|
||||
Vim::action(editor, cx, Vim::move_to_prev_match);
|
||||
Vim::action(editor, cx, Vim::move_to_previous_match);
|
||||
Vim::action(editor, cx, Vim::search);
|
||||
Vim::action(editor, cx, Vim::search_deploy);
|
||||
Vim::action(editor, cx, Vim::find_command);
|
||||
|
@ -94,7 +94,12 @@ impl Vim {
|
|||
)
|
||||
}
|
||||
|
||||
fn move_to_prev(&mut self, action: &MoveToPrev, window: &mut Window, cx: &mut Context<Self>) {
|
||||
fn move_to_previous(
|
||||
&mut self,
|
||||
action: &MoveToPrevious,
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
self.move_to_internal(
|
||||
Direction::Prev,
|
||||
action.case_sensitive,
|
||||
|
@ -114,9 +119,9 @@ impl Vim {
|
|||
self.move_to_match_internal(self.search.direction, window, cx)
|
||||
}
|
||||
|
||||
fn move_to_prev_match(
|
||||
fn move_to_previous_match(
|
||||
&mut self,
|
||||
_: &MoveToPrevMatch,
|
||||
_: &MoveToPreviousMatch,
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue