From 0d78261a308c9513fafb407dc57b4f803d296fcd Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Tue, 11 Oct 2022 21:28:11 -0700 Subject: [PATCH] mux client: consider domain id when mapping panes We weren't matching the domain id when resolving the remote->local pane mapping, which meant that having 2 or more mux client domains active would lead to associating eg: remote pane id 1 with whichever local pane was associated with any remote pane id 1 *first*. This commit requires that both the domain id and the remote pane id match. refs: https://github.com/wez/wezterm/issues/2616 --- docs/changelog.md | 3 +++ wezterm-client/src/domain.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index a25907844..118b03803 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -84,6 +84,9 @@ As features stabilize some brief notes about them will accumulate here. * CharSelect now uppercases hex digit input for better compatibility with QMK-based keyboards that send eg: `CTRL-SHIFT-U e 1 `. [#2581](https://github.com/wez/wezterm/issues/2581) +* Multiple active multiplexer client domain connections could result + in showing duplicate tabs in a window + [#2616](https://github.com/wez/wezterm/issues/2616) #### Changed * Removed Last Resort fallback font diff --git a/wezterm-client/src/domain.rs b/wezterm-client/src/domain.rs index 3ee86008e..91c80bc2f 100644 --- a/wezterm-client/src/domain.rs +++ b/wezterm-client/src/domain.rs @@ -122,6 +122,9 @@ impl ClientInner { let mux = Mux::get().unwrap(); for pane in mux.iter_panes() { + if pane.domain_id() != self.local_domain_id { + continue; + } if let Some(pane) = pane.downcast_ref::() { if pane.remote_pane_id() == remote_pane_id { let local_pane_id = pane.pane_id();