aboutsummaryrefslogtreecommitdiff
path: root/src/workspace.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-07-04 03:14:44 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-07-04 03:15:11 +0300
commitedd08e895fc65e07e500a1fe80e88202deae6b8d (patch)
tree4d4c9df1e94b60a97c8a6be2ffb4f930896898a8 /src/workspace.rs
parent797981c7e907bc6e3050373ba150fb7a8bc651fb (diff)
refactor: route pane layout tui actions through runtime wrappers
Diffstat (limited to 'src/workspace.rs')
-rw-r--r--src/workspace.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/workspace.rs b/src/workspace.rs
index 8216001b..f6060338 100644
--- a/src/workspace.rs
+++ b/src/workspace.rs
@@ -593,10 +593,12 @@ impl Workspace {
true
}
+ #[cfg(test)]
pub fn close_active_tab(&mut self) -> bool {
self.close_tab(self.active_tab)
}
+ #[cfg(test)]
pub fn split_focused(
&mut self,
direction: Direction,
@@ -873,6 +875,7 @@ impl Workspace {
}
/// Close the focused pane. Returns true if the workspace should close.
+ #[cfg(test)]
pub fn close_focused(&mut self) -> bool {
let pane_count = self
.active_tab()
@@ -1156,6 +1159,7 @@ impl Workspace {
self.public_pane_numbers.remove(&pane_id);
}
+ #[cfg(test)]
fn close_active_tab_and_report(&mut self) -> bool {
if self.tabs.len() <= 1 {
return true;