szn

Bug 390 — Session-scoped set prefix silently ineffective

390. Display and behaviour diverge after non-global set

File: src/cmd/cmd.zig:889-901 (cf. correct config path server.zig:3080-3084) Severity: MEDIUM Status: ✅ FIXED

Fix (applied)

cmdSetOption’s non-global session branch now updates server.dispatcher.prefix when the option is prefix and the parsed value is a key (mirroring both the -g path and the config-file loader).

Test: session-scoped set prefix updates the dispatcher — bug #390 (asserts both the stored option and live dispatcher state after set prefix C-a).

Problem

Only the -g branch updates server.dispatcher.prefix. The per-session path stores into session.options, so list-keys/show-options report the new prefix while key handling still uses the old one until restart or a global set.

Fix (proposed)

Apply dispatcher.prefix whenever the affected session is the active session (mirroring the config loader), or make prefix resolution read through the session options at dispatch time.