diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-29 18:09:25 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-29 18:09:25 +0300 |
| commit | 1a4e94e57e181379e2ed42d63a49fbc56ed1dba4 (patch) | |
| tree | 0319544374f1149a405259070b90df9d62854789 /src/app/actions.rs | |
| parent | a937f7e85bbf8780c6030c57f48dab2168bca932 (diff) | |
refactor: route tui mutations through runtime authority
Diffstat (limited to 'src/app/actions.rs')
| -rw-r--r-- | src/app/actions.rs | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/app/actions.rs b/src/app/actions.rs index 92027b6a..56f6e789 100644 --- a/src/app/actions.rs +++ b/src/app/actions.rs @@ -258,7 +258,10 @@ impl AppState { }) } - fn pane_focus_target_indices(&self, target: &PaneFocusTarget) -> Option<(usize, usize)> { + pub(crate) fn pane_focus_target_indices( + &self, + target: &PaneFocusTarget, + ) -> Option<(usize, usize)> { let ws_idx = self .workspaces .iter() @@ -1231,16 +1234,6 @@ impl AppState { self.refresh_tab_bar_view(); } - pub fn move_tab(&mut self, source_idx: usize, insert_idx: usize) { - if let Some(ws) = self.active.and_then(|i| self.workspaces.get_mut(i)) { - if ws.move_tab(source_idx, insert_idx) { - self.mark_session_dirty(); - self.tab_scroll_follow_active = true; - self.refresh_tab_bar_view(); - } - } - } - pub fn next_tab(&mut self) { if let Some(ws) = self.active.and_then(|i| self.workspaces.get(i)) { if !ws.tabs.is_empty() { @@ -1315,7 +1308,7 @@ impl AppState { self.focus_agent_entry(target_idx); } - fn ensure_agent_panel_entry_visible(&mut self, idx: usize) { + pub(crate) fn ensure_agent_panel_entry_visible(&mut self, idx: usize) { if self.sidebar_collapsed { return; } @@ -1486,7 +1479,7 @@ impl AppState { } } - fn refresh_tab_bar_view(&mut self) { + pub(crate) fn refresh_tab_bar_view(&mut self) { let area = self.view.tab_bar_rect; let Some(ws) = self.active.and_then(|idx| self.workspaces.get(idx)) else { self.tab_scroll = 0; |
