T16: the settings window: Cmd-, opens it or brings it forward and Cmd-W closes it, Ctrl-, and Ctrl-Shift-W off macOS; General's rows in Ely's settings layout, Shell in Ely's path input and Start in as Home or the session's folder, each change checked, saved and applied to new sessions at once; a shell saves only when it names a program, else the row says why; the app quits with its last terminal window; shot aims at either window with to:settings and to:main
CI / platforms (windows-latest) (push) Failing after 8s
CI / macos (push) Failing after 9m31s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-14 21:18:25 -04:00
1 parent 7c5f36f0e7
commit 3e1535e921
5 files changed
+321 -23

No files matched your search

+9 -3
View File
@@ -10,7 +10,7 @@ use gpui::{
#[cfg(target_os = "macos")]
use crate::term::mac;
use crate::{
settings::SettingsStore,
settings::{self, SettingsStore},
term::{ICONS, Launch, MONO, config, input, shell::ShellIntegration, spawn},
themes,
workspace::{self, TITLE, Workspace},
@@ -41,9 +41,15 @@ pub fn start(cx: &mut App) -> anyhow::Result<()> {
ShellIntegration::init(cx)?;
input::bind_keys(cx);
workspace::bind_keys(cx);
settings::window::bind_keys(cx);
// Settings alone hold no terminal, so they go with the last one.
cx.on_window_closed(|cx, _| {
if cx.windows().is_empty() {
log::info!("app: no window left; quitting");
let windows = cx.windows();
if !windows
.iter()
.any(|window| window.downcast::<Workspace>().is_some())
{
log::info!("app: no terminal window left; quitting");
cx.quit();
}
})