mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
restore modal terminal
This commit is contained in:
parent
d59911df26
commit
5a0f106005
4 changed files with 12 additions and 32 deletions
|
@ -309,7 +309,8 @@
|
||||||
"cmd-shift-p": "command_palette::Toggle",
|
"cmd-shift-p": "command_palette::Toggle",
|
||||||
"cmd-shift-m": "diagnostics::Deploy",
|
"cmd-shift-m": "diagnostics::Deploy",
|
||||||
"cmd-shift-e": "project_panel::ToggleFocus",
|
"cmd-shift-e": "project_panel::ToggleFocus",
|
||||||
"cmd-alt-s": "workspace::SaveAll"
|
"cmd-alt-s": "workspace::SaveAll",
|
||||||
|
"shift-escape": "terminal::DeployModal"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Bindings from Sublime Text
|
// Bindings from Sublime Text
|
||||||
|
@ -425,5 +426,12 @@
|
||||||
"cmd-v": "terminal::Paste",
|
"cmd-v": "terminal::Paste",
|
||||||
"cmd-k": "terminal::Clear"
|
"cmd-k": "terminal::Clear"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "ModalTerminal",
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-cmd-space": "terminal::ShowCharacterPalette",
|
||||||
|
"shift-escape": "terminal::DeployModal"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
|
@ -1,15 +0,0 @@
|
||||||
[
|
|
||||||
{
|
|
||||||
"context": "Workspace",
|
|
||||||
"bindings": {
|
|
||||||
"shift-escape": "terminal::DeployModal"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"context": "ModalTerminal",
|
|
||||||
"bindings": {
|
|
||||||
"ctrl-cmd-space": "terminal::ShowCharacterPalette",
|
|
||||||
"shift-escape": "terminal::DeployModal"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
|
@ -40,21 +40,11 @@ pub struct Settings {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Default, Deserialize, JsonSchema)]
|
#[derive(Copy, Clone, Debug, Default, Deserialize, JsonSchema)]
|
||||||
pub struct FeatureFlags {
|
pub struct FeatureFlags {}
|
||||||
modal_terminal: Option<bool>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl FeatureFlags {
|
impl FeatureFlags {
|
||||||
pub fn keymap_files(&self) -> Vec<&'static str> {
|
pub fn keymap_files(&self) -> Vec<&'static str> {
|
||||||
let mut res = vec![];
|
vec![]
|
||||||
if self.modal_terminal() {
|
|
||||||
res.push("keymaps/experiments/modal_terminal.json")
|
|
||||||
}
|
|
||||||
res
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn modal_terminal(&self) -> bool {
|
|
||||||
self.modal_terminal.unwrap_or_default()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,10 +53,7 @@ use crate::mappings::{
|
||||||
|
|
||||||
///Initialize and register all of our action handlers
|
///Initialize and register all of our action handlers
|
||||||
pub fn init(cx: &mut MutableAppContext) {
|
pub fn init(cx: &mut MutableAppContext) {
|
||||||
let settings = cx.global::<Settings>();
|
cx.add_action(deploy_modal);
|
||||||
if settings.experiments.modal_terminal() {
|
|
||||||
cx.add_action(deploy_modal);
|
|
||||||
}
|
|
||||||
|
|
||||||
terminal_view::init(cx);
|
terminal_view::init(cx);
|
||||||
terminal_container_view::init(cx);
|
terminal_container_view::init(cx);
|
||||||
|
|
Loading…
Reference in a new issue