Commit 1dba131
committed
neo(feat[fields]): Re-expose 8 version-gated tokens added after tmux 3.2a
why: with the scope+version gating in place, the format string sent to
older tmux versions automatically excludes tokens that those versions
don't recognize. The 8 tokens below first registered in tmux 3.4-3.6 —
tagging them with FIELD_VERSION makes them appear on supported tmux
releases that include them, and absent on older tmux without sending
unknown tokens that bloat the format string or trigger crashes.
what:
- src/libtmux/neo.py:
- Re-add 8 fields to Obj alphabetically: pane_key_mode,
pane_unseen_changes, session_active, session_activity_flag,
session_alert, session_bell_flag, session_silence_flag, client_theme.
- Populate FIELD_VERSION with each token's minimum tmux release
(3.4 for pane_unseen_changes, 3.5 for pane_key_mode, 3.6 for the
five session_* tokens and client_theme).
- tests/test_pane.py: restore pane_key_mode and pane_unseen_changes in
PANE_FORMAT_FIELDS (the parametrized declaration+hydration test).
- tests/test_session.py: restore the 5 new session_* entries in
SESSION_FORMAT_FIELDS.
Verification:
- On tmux 3.6a (local), all 8 tokens hydrate via refresh(); 1182 tests
pass.
- On tmux 3.2a, FIELD_VERSION skips all 8 — the -F template stays at
its pre-PR-#672-rollback shape for that version.
Version anchors verified via:
rg '"<token>"' ~/study/c/tmux-3.<N>a/format.c
across 3.2a, 3.3a, 3.4, 3.5, 3.5a, 3.6, 3.6a.1 parent 35cd656 commit 1dba131
3 files changed
Lines changed: 26 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
46 | 56 | | |
47 | 57 | | |
48 | 58 | | |
| |||
186 | 196 | | |
187 | 197 | | |
188 | 198 | | |
| 199 | + | |
189 | 200 | | |
190 | 201 | | |
191 | 202 | | |
| |||
240 | 251 | | |
241 | 252 | | |
242 | 253 | | |
| 254 | + | |
243 | 255 | | |
244 | 256 | | |
245 | 257 | | |
| |||
257 | 269 | | |
258 | 270 | | |
259 | 271 | | |
| 272 | + | |
260 | 273 | | |
261 | 274 | | |
262 | 275 | | |
| |||
267 | 280 | | |
268 | 281 | | |
269 | 282 | | |
| 283 | + | |
270 | 284 | | |
| 285 | + | |
| 286 | + | |
271 | 287 | | |
272 | 288 | | |
273 | 289 | | |
| 290 | + | |
274 | 291 | | |
275 | 292 | | |
276 | 293 | | |
| |||
286 | 303 | | |
287 | 304 | | |
288 | 305 | | |
| 306 | + | |
289 | 307 | | |
290 | 308 | | |
291 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
| 615 | + | |
615 | 616 | | |
616 | 617 | | |
617 | 618 | | |
618 | 619 | | |
619 | 620 | | |
620 | 621 | | |
621 | 622 | | |
| 623 | + | |
622 | 624 | | |
623 | 625 | | |
624 | 626 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
709 | 709 | | |
710 | 710 | | |
711 | 711 | | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
712 | 716 | | |
713 | 717 | | |
714 | 718 | | |
715 | 719 | | |
716 | 720 | | |
717 | 721 | | |
| 722 | + | |
718 | 723 | | |
719 | 724 | | |
720 | 725 | | |
| |||
0 commit comments