keymap: Update Prev
to Previous
for consistency (#25909)
Closes #10167 This is take 2 on https://github.com/zed-industries/zed/pull/2341 which was closed due to lack of migrator. This PR contains rename of following keymap actions: ```sh 1. ["editor::GoToPrevHunk", { "center_cursor": true }] -> ["editor::GoToPreviousHunk", { "center_cursor": true }] 2. "editor::GoToPrevDiagnostic" -> "editor::GoToPreviousDiagnostic" 3. "editor::ContextMenuPrev" -> "editor::ContextMenuPrevious" 4. "search::SelectPrevMatch" -> "search::SelectPreviousMatch" 5. "file_finder::SelectPrev" -> "file_finder::SelectPrevious" 6. "menu::SelectPrev" -> "menu::SelectPrevious" 7. "editor::TabPrev" -> "editor::Backtab" ``` Release Notes: - Renamed several keymap actions for consistency (e.g., `GoToPrevHunk` → `GoToPreviousHunk`, `TabPrev` → `Backtab`). Your existing configured keybindings will still work. You can click **"Backup and Update"** at the top of your keymap file to easily update to the new actions. Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
This commit is contained in:
parent
61d584db45
commit
593f3dc1d5
43 changed files with 320 additions and 198 deletions
|
@ -26,7 +26,7 @@ use gpui::{
|
|||
};
|
||||
use indexmap::IndexMap;
|
||||
use language::DiagnosticSeverity;
|
||||
use menu::{Confirm, SelectFirst, SelectLast, SelectNext, SelectPrev};
|
||||
use menu::{Confirm, SelectFirst, SelectLast, SelectNext, SelectPrevious};
|
||||
use project::{
|
||||
relativize_path, Entry, EntryKind, Fs, Project, ProjectEntryId, ProjectPath, Worktree,
|
||||
WorktreeId,
|
||||
|
@ -1028,7 +1028,7 @@ impl ProjectPanel {
|
|||
});
|
||||
}
|
||||
|
||||
fn select_prev(&mut self, _: &SelectPrev, window: &mut Window, cx: &mut Context<Self>) {
|
||||
fn select_previous(&mut self, _: &SelectPrevious, window: &mut Window, cx: &mut Context<Self>) {
|
||||
if let Some(edit_state) = &self.edit_state {
|
||||
if edit_state.processing_filename.is_none() {
|
||||
self.filename_editor.update(cx, |editor, cx| {
|
||||
|
@ -4434,7 +4434,7 @@ impl Render for ProjectPanel {
|
|||
}))
|
||||
.key_context(self.dispatch_context(window, cx))
|
||||
.on_action(cx.listener(Self::select_next))
|
||||
.on_action(cx.listener(Self::select_prev))
|
||||
.on_action(cx.listener(Self::select_previous))
|
||||
.on_action(cx.listener(Self::select_first))
|
||||
.on_action(cx.listener(Self::select_last))
|
||||
.on_action(cx.listener(Self::select_parent))
|
||||
|
@ -7522,7 +7522,7 @@ mod tests {
|
|||
);
|
||||
cx.update(|window, cx| {
|
||||
panel.update(cx, |this, cx| {
|
||||
this.select_prev(&Default::default(), window, cx);
|
||||
this.select_previous(&Default::default(), window, cx);
|
||||
})
|
||||
});
|
||||
assert_eq!(
|
||||
|
@ -7579,7 +7579,7 @@ mod tests {
|
|||
// ESC clears out all marks
|
||||
cx.update(|window, cx| {
|
||||
panel.update(cx, |this, cx| {
|
||||
this.select_prev(&SelectPrev, window, cx);
|
||||
this.select_previous(&SelectPrevious, window, cx);
|
||||
this.select_next(&SelectNext, window, cx);
|
||||
})
|
||||
});
|
||||
|
@ -7597,8 +7597,8 @@ mod tests {
|
|||
cx.update(|window, cx| {
|
||||
panel.update(cx, |this, cx| {
|
||||
this.cut(&Cut, window, cx);
|
||||
this.select_prev(&SelectPrev, window, cx);
|
||||
this.select_prev(&SelectPrev, window, cx);
|
||||
this.select_previous(&SelectPrevious, window, cx);
|
||||
this.select_previous(&SelectPrevious, window, cx);
|
||||
|
||||
this.paste(&Paste, window, cx);
|
||||
// this.expand_selected_entry(&ExpandSelectedEntry, cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue