Skip to content

Commit

Permalink
More consistent local/remote naming.
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan2412 committed Feb 13, 2024
1 parent 675256b commit 3941fdc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mux/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ impl Mux {
None => anyhow::bail!("Invalid tab id {}", tab_id),
};

tab.swap_active_with_index(with_pane_index, keep_focus);
tab.local_swap_active_with_index(with_pane_index, keep_focus);
Ok(())
}
pub async fn spawn_tab_or_window(
Expand Down
6 changes: 3 additions & 3 deletions mux/src/tab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -714,10 +714,10 @@ impl Tab {
}

/// Swap the active pane with the specified pane_index
pub fn swap_active_with_index(&self, pane_index: usize, keep_focus: bool) -> Option<()> {
pub fn local_swap_active_with_index(&self, pane_index: usize, keep_focus: bool) -> Option<()> {
self.inner
.lock()
.swap_active_with_index(pane_index, keep_focus)
.local_swap_active_with_index(pane_index, keep_focus)
}

/// Computes the size of the pane that would result if the specified
Expand Down Expand Up @@ -1801,7 +1801,7 @@ impl TabInner {
cell_dimensions(&self.size)
}

fn swap_active_with_index(&mut self, pane_index: usize, keep_focus: bool) -> Option<()> {
fn local_swap_active_with_index(&mut self, pane_index: usize, keep_focus: bool) -> Option<()> {
let active_idx = self.get_active_idx();
let mut pane = self.get_active_pane()?;
log::trace!(
Expand Down
2 changes: 1 addition & 1 deletion wezterm-mux-server-impl/src/sessionhandler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ impl SessionHandler {
let tab = mux
.get_tab(tab_id)
.ok_or_else(|| anyhow!("no such tab {}", tab_id))?;
tab.swap_active_with_index(with_pane_index, keep_focus);
tab.local_swap_active_with_index(with_pane_index, keep_focus);
Ok(Pdu::UnitResponse(UnitResponse {}))
},
send_response,
Expand Down

0 comments on commit 3941fdc

Please sign in to comment.