From 10eb0bc744165ae91dfce9fd731fe170410b34ec Mon Sep 17 00:00:00 2001 From: Can Celik Date: Mon, 3 Aug 2026 02:05:27 +0300 Subject: fix: propagate host color scheme to pane apps (#2214) refs #714 --- src/terminal/runtime.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/terminal') diff --git a/src/terminal/runtime.rs b/src/terminal/runtime.rs index 38b36942..8a3da876 100644 --- a/src/terminal/runtime.rs +++ b/src/terminal/runtime.rs @@ -64,6 +64,7 @@ impl TerminalRuntime { import: crate::handoff_runtime::ImportedHandoffRuntime, scrollback_limit_bytes: usize, host_terminal_theme: crate::terminal_theme::TerminalTheme, + host_terminal_appearance: Option, events: mpsc::Sender, render_notify: Arc, render_dirty: Arc, @@ -72,6 +73,7 @@ impl TerminalRuntime { import, scrollback_limit_bytes, host_terminal_theme, + host_terminal_appearance, events, render_notify, render_dirty, @@ -79,6 +81,8 @@ impl TerminalRuntime { .map(Self) } + // Wrapper mirrors pane runtime construction arguments. + #[allow(clippy::too_many_arguments)] pub fn spawn( pane_id: PaneId, rows: u16, @@ -86,6 +90,7 @@ impl TerminalRuntime { cwd: std::path::PathBuf, scrollback_limit_bytes: usize, host_terminal_theme: crate::terminal_theme::TerminalTheme, + host_terminal_appearance: Option, shell_config: crate::pane::PaneShellConfig<'_>, launch_env: &crate::pane::PaneLaunchEnv, events: mpsc::Sender, @@ -99,6 +104,7 @@ impl TerminalRuntime { cwd, scrollback_limit_bytes, host_terminal_theme, + host_terminal_appearance, shell_config, launch_env, events, @@ -117,6 +123,7 @@ impl TerminalRuntime { cwd: std::path::PathBuf, scrollback_limit_bytes: usize, host_terminal_theme: crate::terminal_theme::TerminalTheme, + host_terminal_appearance: Option, shell_config: crate::pane::PaneShellConfig<'_>, launch_env: &crate::pane::PaneLaunchEnv, initial_history_ansi: Option<&str>, @@ -131,6 +138,7 @@ impl TerminalRuntime { cwd, scrollback_limit_bytes, host_terminal_theme, + host_terminal_appearance, shell_config, launch_env, initial_history_ansi, @@ -153,6 +161,7 @@ impl TerminalRuntime { agent_detection: crate::pane::AgentDetection, scrollback_limit_bytes: usize, host_terminal_theme: crate::terminal_theme::TerminalTheme, + host_terminal_appearance: Option, events: mpsc::Sender, render_notify: Arc, render_dirty: Arc, @@ -167,6 +176,7 @@ impl TerminalRuntime { agent_detection, scrollback_limit_bytes, host_terminal_theme, + host_terminal_appearance, events, render_notify, render_dirty, @@ -186,6 +196,7 @@ impl TerminalRuntime { agent_detection: crate::pane::AgentDetection, scrollback_limit_bytes: usize, host_terminal_theme: crate::terminal_theme::TerminalTheme, + host_terminal_appearance: Option, events: mpsc::Sender, render_notify: Arc, render_dirty: Arc, @@ -200,6 +211,7 @@ impl TerminalRuntime { agent_detection, scrollback_limit_bytes, host_terminal_theme, + host_terminal_appearance, events, render_notify, render_dirty, @@ -211,6 +223,13 @@ impl TerminalRuntime { self.0.apply_host_terminal_theme(theme); } + pub fn apply_host_terminal_appearance( + &self, + appearance: Option, + ) { + self.0.apply_host_terminal_appearance(appearance); + } + pub fn begin_graceful_release(&self, agent: crate::detect::Agent) { self.0.begin_graceful_release(agent); } -- cgit v1.2.3