szn

Bug 384 — mode-keys option is display-only

384. Option exists, default disagrees with behaviour, half of keymap unreachable

File: src/window.zig:201-206; option table src/options.zig:268 Severity: MEDIUM Status: ✅ FIXED

Fix (applied)

Test: enterCopyMode honours mode-keys option — bug #384 (default vi, then switch to emacs via window option).

Problem

pub fn enterCopyMode(self: *Pane) !void {
    ...
    self.screen.copy_mode = @import("mode_copy.zig").CopyMode.init(.vi);

The only construction site passes .vi. Users setting mode-keys emacs see no change; users relying on the documented default get vi keys anyway. The entire emacs handler (handleEmacsKey, mode_copy.zig:801-906) can never run.

Fix (proposed)

Read the session’s mode-keys option in enterCopyMode and pass it through; while there, wire or delete the sibling dead option prefix2 (options.zig:246, zero consumers).