Skip to content

v0.9.1

Choose a tag to compare

@cwt cwt released this 26 Sep 18:30
· 160 commits to main since this release

szn v0.9.1

2 commits since v0.9.0. 967 tests passing.


Headline: Hotfix for Window Status Option Routing & Real-Time Status Invalidation

v0.9.1 is a targeted hotfix release addressing configuration routing, status-line cache freezing, and character alignment issues affecting window-status-format and window-status-current-format (Bug #440).


Key Improvements & Bug Fixes

1. Global Window Option Routing & Fallback (#440)

  • Unscoped set -g Fallback: When configuring options with set -g (or bare set) in config files or via CLI without explicit -s / -w flags, option resolution tries session options first; on error.UnknownOption, it seamlessly falls back to window options. Directives such as set -g window-status-format '#I:#W' and set -g window-status-current-format '#I:#W#F' now configure correctly instead of being dropped.
  • Dedicated set-window-option / setw Command: Added native support for set-window-option / setw in both szn.conf configuration files and the interactive CLI command table (bringing total available commands to 49).

2. Real-Time Status Cache Invalidation & Zero-Lag Triggers (#440, #441, #442)

  • Comprehensive State Change Invalidation: Fixed status cache freezing across all interactive terminal operations. The status line is now immediately invalidated and redrawn on auto-rename process changes (getForegroundProcessName), OSC 0/2 window title sequences (windowTitleCallback), active pane switches (select-pane, arrow keys, mouse focus clicks), pane splits/kills/swaps, window lifecycle operations (new-window, kill-window, rename-window), and IPC command dispatches.
  • Zero-Latency Foreground Process Detection via PGID: Added lightweight tcgetpgrp foreground process group ID change detection (last_foreground_pgid), instantaneously querying the foreground process name on the very first frame of execution or exit (0 ms delay) without burning CPU cycles while the process is running.

3. Single-Quote Comment & Format String Handling (#440)

  • Single Quotes in Config Files: Updated stripInlineComment() and parseValue() in src/cfg.zig to support single-quoted format strings ('#I:#W'). Embedded # characters inside single quotes are no longer misinterpreted as inline comment delimiters.

4. Per-Window Status Format Overrides (#440)

  • Per-Window Format Evaluation: Status line rendering now extracts format options (window-status-format, window-status-current-format) per individual window instead of applying the active window's format globally to all windows.

5. Wide Character Cell Width Truncation (#440)

  • Cell-Width Aware Truncation: Fixed truncateVisible() in src/status.zig to measure character cell width via char_width.charWidth(), matching visibleLen() and preventing half-cell splits or column desync when displaying wide CJK characters and emojis in the status bar.

Testing & Quality Assurance

Metric v0.9.0 v0.9.1
Total Passing Tests 959 970
New Regression Tests — 11
Open Bugs in Tracker 0 0
Build Status Debug & ReleaseSafe Debug, ReleaseSafe & ReleaseFast passing