macos: Keybind improvements for binds involving shift (#21207)
Fix cmd-pipe Remove redudnant jetbrains/sublime keybinds (these exist as `cmd-{` and `cmd-}` under default vscode keymap) and were broken as part of the recent keybind changes. Remove excess JSON whitespace from tests to make them more readable.
This commit is contained in:
parent
9999c31859
commit
fdc17c57d7
2 changed files with 15 additions and 75 deletions
|
@ -355,7 +355,7 @@
|
|||
"alt-cmd-f12": "editor::GoToTypeDefinitionSplit",
|
||||
"alt-shift-f12": "editor::FindAllReferences",
|
||||
"ctrl-m": "editor::MoveToEnclosingBracket",
|
||||
"cmd-shift-\\": "editor::MoveToEnclosingBracket",
|
||||
"cmd-|": "editor::MoveToEnclosingBracket",
|
||||
"alt-cmd-[": "editor::Fold",
|
||||
"alt-cmd-]": "editor::UnfoldLines",
|
||||
"cmd-k cmd-l": "editor::ToggleFold",
|
||||
|
|
|
@ -3190,12 +3190,7 @@ mod tests {
|
|||
.fs
|
||||
.save(
|
||||
"/settings.json".as_ref(),
|
||||
&r#"
|
||||
{
|
||||
"base_keymap": "Atom"
|
||||
}
|
||||
"#
|
||||
.into(),
|
||||
&r#"{"base_keymap": "Atom"}"#.into(),
|
||||
Default::default(),
|
||||
)
|
||||
.await
|
||||
|
@ -3205,16 +3200,7 @@ mod tests {
|
|||
.fs
|
||||
.save(
|
||||
"/keymap.json".as_ref(),
|
||||
&r#"
|
||||
[
|
||||
{
|
||||
"bindings": {
|
||||
"backspace": "test1::A"
|
||||
}
|
||||
}
|
||||
]
|
||||
"#
|
||||
.into(),
|
||||
&r#"[{"bindings": {"backspace": "test1::A"}}]"#.into(),
|
||||
Default::default(),
|
||||
)
|
||||
.await
|
||||
|
@ -3257,16 +3243,7 @@ mod tests {
|
|||
.fs
|
||||
.save(
|
||||
"/keymap.json".as_ref(),
|
||||
&r#"
|
||||
[
|
||||
{
|
||||
"bindings": {
|
||||
"backspace": "test1::B"
|
||||
}
|
||||
}
|
||||
]
|
||||
"#
|
||||
.into(),
|
||||
&r#"[{"bindings": {"backspace": "test1::B"}}]"#.into(),
|
||||
Default::default(),
|
||||
)
|
||||
.await
|
||||
|
@ -3286,12 +3263,7 @@ mod tests {
|
|||
.fs
|
||||
.save(
|
||||
"/settings.json".as_ref(),
|
||||
&r#"
|
||||
{
|
||||
"base_keymap": "JetBrains"
|
||||
}
|
||||
"#
|
||||
.into(),
|
||||
&r#"{"base_keymap": "JetBrains"}"#.into(),
|
||||
Default::default(),
|
||||
)
|
||||
.await
|
||||
|
@ -3318,24 +3290,20 @@ mod tests {
|
|||
// From the Atom keymap
|
||||
use workspace::ActivatePreviousPane;
|
||||
// From the JetBrains keymap
|
||||
use pane::ActivatePrevItem;
|
||||
use diagnostics::Deploy;
|
||||
|
||||
workspace
|
||||
.update(cx, |workspace, _| {
|
||||
workspace
|
||||
.register_action(|_, _: &A, _| {})
|
||||
.register_action(|_, _: &B, _| {});
|
||||
workspace.register_action(|_, _: &A, _cx| {});
|
||||
workspace.register_action(|_, _: &B, _cx| {});
|
||||
workspace.register_action(|_, _: &Deploy, _cx| {});
|
||||
})
|
||||
.unwrap();
|
||||
app_state
|
||||
.fs
|
||||
.save(
|
||||
"/settings.json".as_ref(),
|
||||
&r#"
|
||||
{
|
||||
"base_keymap": "Atom"
|
||||
}
|
||||
"#
|
||||
.into(),
|
||||
&r#"{"base_keymap": "Atom"}"#.into(),
|
||||
Default::default(),
|
||||
)
|
||||
.await
|
||||
|
@ -3344,16 +3312,7 @@ mod tests {
|
|||
.fs
|
||||
.save(
|
||||
"/keymap.json".as_ref(),
|
||||
&r#"
|
||||
[
|
||||
{
|
||||
"bindings": {
|
||||
"backspace": "test2::A"
|
||||
}
|
||||
}
|
||||
]
|
||||
"#
|
||||
.into(),
|
||||
&r#"[{"bindings": {"backspace": "test2::A"}}]"#.into(),
|
||||
Default::default(),
|
||||
)
|
||||
.await
|
||||
|
@ -3391,16 +3350,7 @@ mod tests {
|
|||
.fs
|
||||
.save(
|
||||
"/keymap.json".as_ref(),
|
||||
&r#"
|
||||
[
|
||||
{
|
||||
"bindings": {
|
||||
"backspace": null
|
||||
}
|
||||
}
|
||||
]
|
||||
"#
|
||||
.into(),
|
||||
&r#"[{"bindings": {"backspace": null}}]"#.into(),
|
||||
Default::default(),
|
||||
)
|
||||
.await
|
||||
|
@ -3420,12 +3370,7 @@ mod tests {
|
|||
.fs
|
||||
.save(
|
||||
"/settings.json".as_ref(),
|
||||
&r#"
|
||||
{
|
||||
"base_keymap": "JetBrains"
|
||||
}
|
||||
"#
|
||||
.into(),
|
||||
&r#"{"base_keymap": "JetBrains"}"#.into(),
|
||||
Default::default(),
|
||||
)
|
||||
.await
|
||||
|
@ -3433,12 +3378,7 @@ mod tests {
|
|||
|
||||
cx.background_executor.run_until_parked();
|
||||
|
||||
assert_key_bindings_for(
|
||||
workspace.into(),
|
||||
cx,
|
||||
vec![("[", &ActivatePrevItem)],
|
||||
line!(),
|
||||
);
|
||||
assert_key_bindings_for(workspace.into(), cx, vec![("6", &Deploy)], line!());
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue