Skip to content
This repository was archived by the owner on May 24, 2026. It is now read-only.

feat: add save_non_local_domains opt-in flag for scrollback capture - #146

Open
FelixIsaac wants to merge 1 commit into
MLFlexer:mainfrom
FelixIsaac:felix/non-local-domain-scrollback
Open

feat: add save_non_local_domains opt-in flag for scrollback capture#146
FelixIsaac wants to merge 1 commit into
MLFlexer:mainfrom
FelixIsaac:felix/non-local-domain-scrollback

Conversation

@FelixIsaac

Copy link
Copy Markdown

Problem

When using WezTerm with a unix mux domain (connect unix), pane scrollback is not captured on save because pane:inject_output() is unavailable for non-local domains. The guard at line 94 (if domain == "local" then) silently skips scrollback for all non-local panes.

Fixes #41

Solution

Add an opt-in config flag pane_tree.save_non_local_domains = false (default false, no behaviour change). When set to true, scrollback is captured for all domains.

local resurrect = require("resurrect")
resurrect.pane_tree.save_non_local_domains = true

Since inject_output is unavailable for non-local domains, callers that enable this flag need their own restore workaround (e.g. writing scrollback to a temp file and replaying via send_text).

Changes

  • plugin/resurrect/pane_tree.lua: add pub.save_non_local_domains = false; change condition to domain == "local" or pub.save_non_local_domains

Test plan

  • Default (false): existing behaviour unchanged — non-local panes skip scrollback capture
  • Set to true: non-local domain panes have text/alt_screen_active populated in saved state

🤖 Generated with Claude Code

Adds `pub.save_non_local_domains = false` config option to pane_tree.
When set to true, scrollback is captured for non-local domains (e.g.
WezTerm unix mux server) as well as local panes.

Restoration of non-local domain scrollback requires a workaround on
the caller side (send_text + temp file) since inject_output is
unavailable for non-local domains.

Closes MLFlexer#41

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restore lines for non-local domains

1 participant