szn

Bug 518 — inert option-table entries

518. Options that are writable and listed but never consumed

Severity: LOW Status: ✅ FIXED Files: src/options.zig:242-301, README.md

Problem

The option tables declare entries that no code path reads. Verified by grepping each name across src/ excluding options.zig itself:

Option References outside options.zig
default-terminal 0
set-titles 0
set-clipboard 0
aggressive-resize 0
clock-mode-colour 0
clock-mode-style 0
main-pane-height 0
main-pane-width 0
monitor-activity 0
monitor-silence 0
synchronize-panes 0
word-separators 0
fill-character 0

Because they are real table entries, set-option accepts them and show-options lists them, so a user has no way to tell that writing them does nothing. The most visible case is default-terminal: README.md instructs users to set -g default-terminal xterm-256color to restore legacy mouse behaviour, and that instruction is inert.

clock-mode-style is worse than inert — per bug #516 it cannot even be set, because its choices are bare digits.

Proposed Fix

For each entry, either wire it up or remove it from the table. Removing is the honest default for the ones with no implementation; keeping them means show-options should mark them unsupported. At minimum, fix the README.md reference to default-terminal so it does not advertise a no-op.

Fix

The honest fix — remove the entries rather than advertise support that does not exist. All thirteen were deleted from SESSION_OPTIONS and WINDOW_OPTIONS in src/options.zig:

Removing them means set-option now returns UnknownOption and show-options no longer lists them, so a user gets an honest error instead of a silent no-op. No consumer read any of them, confirmed by grepping each name across src/ outside options.zig (only the docs and the now-updated tests referenced them).

Collateral updates:

Regression tests

Verified with the full suite on Zig 0.16.0 and 0.17.0: 1058/1058 passing on both.

Bugs #392 and #424 were dead-code inventories; both covered functions and fields but neither covered the option tables. Bug #507 catalogued the mutable module globals.