Skip to content

fix(resurrect): target panes by immutable %id, not shifting indices#32

Open
MattKotsenas wants to merge 1 commit into
psmux:mainfrom
MattKotsenas:feat/resurrect-pane-id-targeting
Open

fix(resurrect): target panes by immutable %id, not shifting indices#32
MattKotsenas wants to merge 1 commit into
psmux:mainfrom
MattKotsenas:feat/resurrect-pane-id-targeting

Conversation

@MattKotsenas

@MattKotsenas MattKotsenas commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Problem

restore.ps1 relaunches saved processes with send-keys aimed at panes by index (derived from list-windows | Select -Last 1). When window/pane indices shift during restore, send-keys/select-pane could land on the wrong pane.

Change

Capture each pane's immutable %id at creation (with -P -F '#{pane_id}') and target every restore operation by that id. If a capture ever fails, the pane/window is skipped rather than mis-targeted.

Also folds the per-pane restore operations into a single pass and drops two now-vestigial sleeps.

Notes

  • Keeps the send-keys relaunch mechanism for tmux-resurrect parity

restore.ps1 relaunched processes with send-keys aimed at session:windowIndex.paneIndex strings, with the window index derived via list-windows piped to Select -Last 1. When indices shifted, send-keys/select-pane could land on the wrong pane.

Capture each pane's immutable %id at creation (new-session/new-window/split-window with -P -F #{pane_id}) and target every operation by id, keeping the index string as a per-pane fallback so a missed capture never breaks restore. Keeps the send-keys mechanism for tmux-resurrect parity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant