Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/tmux-releases.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"3.4" = "551ab8dea0bf505c0ad6b7bb35ef567cdde0ccb84357df142c254f35a23e19aa"
"3.5" = "2fe01942e7e7d93f524a22f2c883822c06bc258a4d61dba4b407353d7081950f"
"3.6" = "136db80cfbfba617a103401f52874e7c64927986b65b1b700350b6058ad69607"
"3.7" = "2344f191501b8a73eb71dd6c5fd5dcf8c765f5066f34ab46f04b3013dc7bc1a5"
"3.7c" = "7c60cae9a0e25288e2e24750aafc9e8800fc7fd4555e447e1b29ee4201cfb3bf"
"3.8" = "e79c699c7e949dccd0a4a125e17b8d1261e311b16979dbc8eb34542f3966d82e"
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ jobs:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.15']
tmux-version: ['3.3a', '3.4', '3.5', '3.6', '3.7', '3.8', 'master']
tmux-version: ['3.3a', '3.4', '3.5', '3.6', '3.7c', '3.8', 'master']
steps:
- uses: actions/checkout@v7

Expand Down
96 changes: 96 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,102 @@ $ tmuxp@next load yoursession
_Notes on the upcoming release will go here._
<!-- END PLACEHOLDER - ADD NEW CHANGELOG ENTRIES BELOW THIS LINE -->

### Breaking changes

#### `tmuxp freeze` keeps window `@` user options as strings (#1113)

`tmuxp freeze` now writes window `@` user options as strings instead of
converting numeric and boolean-looking values to integers or booleans, and
writes an unnamed window (`rename-window ""`) as `window_name: ''` instead of
`window_name: null`. On `tmuxp load`, string option values pass through `$VAR`
and `~` expansion, and frozen unnamed windows reload without raising
`TypeError`.

Given a live window renamed to `""` with `@badge` set to `007` and `@enabled`
set to `on`:

```console
$ tmux rename-window "" && \
tmux set-option -w @badge 007 && \
tmux set-option -w @enabled on
```

Before, `tmuxp freeze` converted `@badge` to `7` (dropping its leading zeros),
`@enabled` to `true`, and the unnamed window to `null`:

```yaml
windows:
- window_name: null
options:
'@badge': 7
'@enabled': true
```

Now, `tmuxp freeze` keeps `@` options as strings and writes the unnamed window
as `''`:

```yaml
windows:
- window_name: ''
options:
'@badge': '007'
'@enabled': 'on'
```

This comes from libtmux 0.69.0. Unpatched tmux 3.7 rejects empty window names
(`""`), `:` and `.` in session and window names; use tmux 3.7a or newer (3.7c
is the latest 3.7 patch release).

### Dependencies

#### Minimum `libtmux~=0.69.0` (was `~=0.68.0`) (#1113)

Picks up libtmux 0.69.0. `with Server()` leaves a running tmux server alive on
exit unless `Server(..., kill_on_exit=True)` is set, `@` user options stay
strings in `show_option()` and `show_options()`, and empty tmux format fields
hydrate as `""` instead of `None` while unset fields stay `None`. See the
[libtmux 0.69.0 release notes](https://libtmux.git-pull.com/history/#libtmux-0-69-0-2026-11-27).

### Development

#### CI exercises tmux 3.7c instead of unpatched 3.7 (#1113)

CI replaces the unpatched tmux 3.7 release (2026-06-26) with 3.7c (2026-08-17,
the latest 3.7 patch release) in `.github/workflows/tests.yml` and
`.github/tmux-releases.toml`, and sets `fail-fast: false` so every matrix leg
runs to completion.

Unpatched tmux 3.7 shipped four regressions fixed five days later in 3.7a
(2026-07-01), followed by additional fixes in 3.7b and 3.7c:

- Empty window and session names (`""`) fail with `invalid window name:` or
`invalid session name:` because `check_name()` and `clean_name()` reject
`*name == '\0'` in
[`tmux.c`](https://github.com/tmux/tmux/blob/3.7/tmux.c#L284-L318), blocking
`rename-window ""`
([`cmd-rename-window.c`](https://github.com/tmux/tmux/blob/3.7/cmd-rename-window.c#L53-L58))
and `new-window -n ""` when loading `window_name: ''`
([`cmd-new-window.c`](https://github.com/tmux/tmux/blob/3.7/cmd-new-window.c#L73-L83)).
- `:` and `.` in session, session-group, and window names fail with
`invalid session name:` or `invalid window name:` via `WINDOW_NAME_FORBID` and
`SESSION_NAME_FORBID` in
[`tmux.h`](https://github.com/tmux/tmux/blob/3.7/tmux.h#L99-L103) and
[`cmd-new-session.c`](https://github.com/tmux/tmux/blob/3.7/cmd-new-session.c#L102-L121),
breaking workspaces named like `my.project` or `v1.0`.
- `#[` style directives in `automatic-rename-format` and escape-set titles are
rewritten to `_` via `WINDOW_NAME_FORBID_EXT` (`":.#"`) in
[`tmux.c`](https://github.com/tmux/tmux/blob/3.7/tmux.c#L292-L295);
[`tmux 3.7a`](https://github.com/tmux/tmux/blob/3.7a/tmux.c#L284-L307)
restricts `#` scrubbing to untrusted `#(` shell commands and restores `:`,
`.` and `""`.
- `break-pane` without `-n` dereferences `NULL` and crashes the tmux server due
to an inverted `if (name != NULL)` guard in
[`cmd-break-pane.c`](https://github.com/tmux/tmux/blob/3.7/cmd-break-pane.c#L117-L124).
- [`tmux 3.7b`](https://github.com/tmux/tmux/blob/3.7b/input.c#L1956-L1960)
restores `PANE_REDRAW` at the end of a synchronized update (`CSI ? 2026 l`),
and `3.7c` fixes unzooming before creating a floating pane and new-window
scrollbar initialization.

## tmuxp 1.82.0 (2026-11-24)

tmuxp 1.82.0 updates libtmux to 0.68.0. When an earlier entry in a pane's
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ include = [
{ path = "conftest.py", format = "sdist" },
]
dependencies = [
"libtmux~=0.68.0",
"libtmux~=0.69.0",
"PyYAML>=6.0"
]

Expand Down
25 changes: 24 additions & 1 deletion tests/workspace/test_freezer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from tests.fixtures import utils as test_utils
from tmuxp._internal.config_reader import ConfigReader
from tmuxp.workspace import freezer, validation
from tmuxp.workspace import freezer, loader, validation
from tmuxp.workspace.builder import WorkspaceBuilder

if typing.TYPE_CHECKING:
Expand Down Expand Up @@ -133,3 +133,26 @@ def test_freeze_logs_debug(
window_records = [r for r in caplog.records if r.msg == "frozen window"]
assert len(window_records) >= 1
assert hasattr(window_records[0], "tmux_window")


def test_freeze_preserves_window_user_options_and_empty_name(
session: Session,
) -> None:
"""Freeze window @ user options as strings and empty window names as ''."""
window = session.active_window
window.set_option("automatic-rename", "off")
window.rename_window("")
window.set_option("@badge", "007")
window.set_option("@enabled", "on")

frozen = freezer.freeze(session)
validation.validate_schema(frozen)

yaml_text = ConfigReader._dump(fmt="yaml", content=frozen)
reloaded = ConfigReader._load(fmt="yaml", content=yaml_text)
expanded = loader.expand(reloaded)

frozen_window = expanded["windows"][0]
assert frozen_window["window_name"] == ""
assert frozen_window["options"]["@badge"] == "007"
assert frozen_window["options"]["@enabled"] == "on"
8 changes: 4 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.