Skip to content

Commit

Permalink
Rename ExpandAllHunkDiffs to ExpandAllDiffHunks (#25369)
Browse files Browse the repository at this point in the history
This is more consistent with the nomenclature in the rest of Zed.

Release Notes:

- Renamed the `editor::ExpandAllHunkDiffs` action to
`editor::ExpandAllDiffHunks`
  • Loading branch information
cole-miller authored Feb 22, 2025
1 parent ec56755 commit 4118f42
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion assets/keymaps/default-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"ctrl-;": "editor::ToggleLineNumbers",
"ctrl-k ctrl-r": "git::Restore",
"ctrl-'": "editor::ToggleSelectedDiffHunks",
"ctrl-\"": "editor::ExpandAllHunkDiffs",
"ctrl-\"": "editor::ExpandAllDiffHunks",
"ctrl-i": "editor::ShowSignatureHelp",
"alt-g b": "editor::ToggleGitBlame",
"menu": "editor::OpenContextMenu",
Expand Down
2 changes: 1 addition & 1 deletion assets/keymaps/default-macos.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"cmd-y": "git::StageAndNext",
"cmd-shift-y": "git::UnstageAndNext",
"cmd-'": "editor::ToggleSelectedDiffHunks",
"cmd-\"": "editor::ExpandAllHunkDiffs",
"cmd-\"": "editor::ExpandAllDiffHunks",
"cmd-alt-g b": "editor::ToggleGitBlame",
"cmd-i": "editor::ShowSignatureHelp",
"ctrl-f12": "editor::GoToDeclaration",
Expand Down
2 changes: 1 addition & 1 deletion crates/editor/src/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ gpui::actions!(
DuplicateLineDown,
DuplicateLineUp,
DuplicateSelection,
ExpandAllHunkDiffs,
ExpandMacroRecursively,
FindAllReferences,
Fold,
Expand Down Expand Up @@ -425,3 +424,4 @@ action_as!(go_to_line, ToggleGoToLine as Toggle);

action_with_deprecated_aliases!(editor, OpenSelectedFilename, ["editor::OpenFile"]);
action_with_deprecated_aliases!(editor, ToggleSelectedDiffHunks, ["editor::ToggleHunkDiff"]);
action_with_deprecated_aliases!(editor, ExpandAllDiffHunks, ["editor::ExpandAllHunkDiffs"]);
2 changes: 1 addition & 1 deletion crates/editor/src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12750,7 +12750,7 @@ impl Editor {

pub fn expand_all_diff_hunks(
&mut self,
_: &ExpandAllHunkDiffs,
_: &ExpandAllDiffHunks,
_window: &mut Window,
cx: &mut Context<Self>,
) {
Expand Down
10 changes: 5 additions & 5 deletions crates/editor/src/editor_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13306,7 +13306,7 @@ async fn test_diff_base_change_with_expanded_diff_hunks(
executor.run_until_parked();

cx.update_editor(|editor, window, cx| {
editor.expand_all_diff_hunks(&ExpandAllHunkDiffs, window, cx);
editor.expand_all_diff_hunks(&ExpandAllDiffHunks, window, cx);
});
executor.run_until_parked();
cx.assert_state_with_diff(
Expand Down Expand Up @@ -13634,7 +13634,7 @@ async fn test_edits_around_expanded_insertion_hunks(
executor.run_until_parked();

cx.update_editor(|editor, window, cx| {
editor.expand_all_diff_hunks(&ExpandAllHunkDiffs, window, cx);
editor.expand_all_diff_hunks(&ExpandAllDiffHunks, window, cx);
});
executor.run_until_parked();

Expand Down Expand Up @@ -13905,7 +13905,7 @@ async fn test_edits_around_expanded_deletion_hunks(
executor.run_until_parked();

cx.update_editor(|editor, window, cx| {
editor.expand_all_diff_hunks(&ExpandAllHunkDiffs, window, cx);
editor.expand_all_diff_hunks(&ExpandAllDiffHunks, window, cx);
});
executor.run_until_parked();

Expand Down Expand Up @@ -14028,7 +14028,7 @@ async fn test_backspace_after_deletion_hunk(executor: BackgroundExecutor, cx: &m
executor.run_until_parked();

cx.update_editor(|editor, window, cx| {
editor.expand_all_diff_hunks(&ExpandAllHunkDiffs, window, cx);
editor.expand_all_diff_hunks(&ExpandAllDiffHunks, window, cx);
});
executor.run_until_parked();

Expand Down Expand Up @@ -14109,7 +14109,7 @@ async fn test_edit_after_expanded_modification_hunk(
cx.set_diff_base(&diff_base);
executor.run_until_parked();
cx.update_editor(|editor, window, cx| {
editor.expand_all_diff_hunks(&ExpandAllHunkDiffs, window, cx);
editor.expand_all_diff_hunks(&ExpandAllDiffHunks, window, cx);
});
executor.run_until_parked();

Expand Down

0 comments on commit 4118f42

Please sign in to comment.