diff options
| author | user <user@clank> | 2026-08-12 14:52:13 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-12 14:52:43 +0200 |
| commit | 598e77563b8c6cace224c763e00d2fdb4157a869 (patch) | |
| tree | beda042e3e355eef9513a461a48d15635c611b89 /README.md | |
| parent | sl0p: per-pane status bar via OSC 5577 (experimental) (diff) | |
| download | sl0ppij-598e77563b8c6cace224c763e00d2fdb4157a869.tar.gz sl0ppij-598e77563b8c6cace224c763e00d2fdb4157a869.tar.xz sl0ppij-598e77563b8c6cace224c763e00d2fdb4157a869.zip | |
sl0p: serialise the pane status bar for resurrection
The status bar survived detach/reattach (it lives on Grid) but not a
serialise/restore cycle, so a resurrected pane came back blank.
It now travels the whole per-pane serialisation pipeline, mirroring the fork's
existing default_fg/default_bg: pane -> PaneLayoutMetadata ->
PaneLayoutManifest -> TiledPaneLayout -> a status_bar property in the serialised
KDL, then back through the normal layout parser and applied by LayoutApplier
when the pane is recreated.
The sanitiser moved from grid.rs into zellij-utils so both entry points share
one definition. That matters: a layout file on disk is no more trustworthy than
the escape sequence that wrote it -- it may have been hand-edited, or copied from
somewhere else -- so restored text is stripped and length-capped on the way in
just like the OSC payload was.
Verified end to end rather than by unit test alone: set the bar, waited for a
serialisation pass, confirmed status_bar="..." in session-layout.kdl, killed the
session until list-sessions reported EXITED, then attached and watched it come
back from disk. The earlier attempt only proved detach/reattach because Quit had
left the session alive.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -338,7 +338,16 @@ The frame row is already a text surface and costs nothing. It outranks the frame's other hints (resize help, mouse shortcuts), since those are discoverable elsewhere and this was explicitly requested by the program. It lives on the pane's `Grid` like the window title, so it survives re-renders, -resizes and detach/reattach. It does **not** yet survive session resurrection. +resizes and detach/reattach — and it is serialised with the session, so a pane +resurrected from disk comes back showing what it showed before: + +```kdl +pane focus=true contents_file="initial_contents_2" status_bar="building 3/7" +``` + +The text is sanitised again when that layout is parsed back, because a layout file +on disk is no more trustworthy than the escape sequence that produced it and may +have been hand-edited since. One sanitiser serves both paths. The payload is versioned (`;1;`) and unknown versions or verbs are ignored, so adding verbs later cannot be misinterpreted by an older build. The text is the |
