Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix issue with `cmd-w` closing window in preview tabs on MacOS (#25878)

Ben Kunklefec228bb236e
diff --git a/assets/keymaps/default-macos.json b/assets/keymaps/default-macos.json
index b69cc66c32e..c4cf2257091 100644
--- a/assets/keymaps/default-macos.json
+++ b/assets/keymaps/default-macos.json
@@ -1,4 +1,15 @@
[
+ // Moved before Standard macOS bindings so that `cmd-w` is not the last binding for
+ // `workspace::CloseWindow` and displayed/intercepted by macOS
+ {
+ "context": "PromptLibrary",
+ "use_key_equivalents": true,
+ "bindings": {
+ "cmd-n": "prompt_library::NewPrompt",
+ "cmd-shift-s": "prompt_library::ToggleDefaultPrompt",
+ "cmd-w": "workspace::CloseWindow"
+ }
+ },
// Standard macOS bindings
{
"use_key_equivalents": true,
@@ -270,15 +281,6 @@
"backspace": "assistant2::RemoveSelectedThread"
}
},
- {
- "context": "PromptLibrary",
- "use_key_equivalents": true,
- "bindings": {
- "cmd-n": "prompt_library::NewPrompt",
- "cmd-shift-s": "prompt_library::ToggleDefaultPrompt",
- "cmd-w": "workspace::CloseWindow"
- }
- },
{
"context": "BufferSearchBar",
"use_key_equivalents": true,