diff --git a/docs/changelog.md b/docs/changelog.md index f929b9903..2557a7017 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -30,6 +30,7 @@ As features stabilize some brief notes about them will accumulate here. * Fixed: Windows: pane could linger after the process has died, closing only when a new pane/tab event occurs * Fixed: Windows: first character after `wezterm ssh` keyboard authention was swallowed [#771](https://github.com/wez/wezterm/issues/771) * Fixed: Windows: detect window resizes while authenticating for `wezterm ssh` [#696](https://github.com/wez/wezterm/issues/696) +* Fixed: OSC 52 clipboard escape didn't work in the initial pane spawned in the multiplexer server [#764](https://github.com/wez/wezterm/issues/764) ### 20210502-154244-3f7122cb diff --git a/wezterm-mux-server-impl/src/sessionhandler.rs b/wezterm-mux-server-impl/src/sessionhandler.rs index ac1433cc0..2976bbd4c 100644 --- a/wezterm-mux-server-impl/src/sessionhandler.rs +++ b/wezterm-mux-server-impl/src/sessionhandler.rs @@ -158,6 +158,17 @@ pub struct SessionHandler { impl SessionHandler { pub fn new(to_write_tx: PduSender) -> Self { + // Fixup the clipboard on the empty initial pane that is + // spawned into the mux + let mux = Mux::get().unwrap(); + for pane in mux.iter_panes() { + let clip: Arc = Arc::new(RemoteClipboard { + pane_id: pane.pane_id(), + sender: to_write_tx.clone(), + }); + pane.set_clipboard(&clip); + } + Self { to_write_tx, per_pane: HashMap::new(),