aboutsummaryrefslogtreecommitdiff
path: root/src/app/state.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-17 01:41:17 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-17 01:41:17 +0300
commit3ecacfddae86d603bfd0d1a0c01602b1d34b1df3 (patch)
tree277941c065295af2bd161c6be6fd7a2555c1f060 /src/app/state.rs
parenta36da363f14639085bec91d7a378d6c2eeaa6c58 (diff)
feat: add direct terminal attach stream
Diffstat (limited to 'src/app/state.rs')
-rw-r--r--src/app/state.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/app/state.rs b/src/app/state.rs
index daed47f0..ff5357b2 100644
--- a/src/app/state.rs
+++ b/src/app/state.rs
@@ -822,6 +822,8 @@ pub struct AppState {
std::collections::HashMap<crate::terminal::TerminalId, crate::terminal::TerminalState>,
pub terminal_runtimes:
std::collections::HashMap<crate::terminal::TerminalId, crate::terminal::TerminalRuntime>,
+ /// Terminal ids whose size is currently owned by a direct attach client.
+ pub direct_attach_resize_locks: std::collections::HashSet<crate::terminal::TerminalId>,
pub workspaces: Vec<Workspace>,
pub active: Option<usize>,
pub selected: usize,
@@ -933,8 +935,7 @@ impl AppState {
self.mode == Mode::Terminal
&& self
.active
- .and_then(|idx| self.workspaces.get(idx))
- .and_then(crate::workspace::Workspace::focused_runtime)
+ .and_then(|idx| self.focused_runtime_in_workspace(idx))
.and_then(crate::pane::PaneRuntime::input_state)
.is_some_and(crate::pane::InputState::mouse_reporting_enabled)
}
@@ -1060,6 +1061,7 @@ impl AppState {
Self {
terminals: std::collections::HashMap::new(),
terminal_runtimes: std::collections::HashMap::new(),
+ direct_attach_resize_locks: std::collections::HashSet::new(),
workspaces: Vec::new(),
active: None,
selected: 0,