szn

Bug 326 — Substring flag matching & combined flag failure in mapCommandToAction

326. Substring flag matching & combined flag failure in mapCommandToAction

File: src/key_binding.zig:475-498 Severity: MEDIUM Status: ✅ FIXED

mapCommandToAction used std.mem.indexOf(u8, trimmed, " -h") and exact string equality for select-pane, failing on combined flags (-fh), extra whitespace, or aliases.

Root Cause

Naive string substring matching instead of tokenizing flags.

Fix

Refactored mapCommandToAction to tokenize argument flags cleanly with std.mem.tokenizeAny.

Impact

Incorrect command dispatch when key bindings contain target parameters containing flag substrings.