Summary #
The spell driver no longer masks lines before sending them to the enchant spell checker, causing enchant to check code syntax, which can flood the store with false positives and increase CPU usage.
The Problem #
In src/cursed/spell/driver.lua, the previous logic computed a visible window, built masked lines (replacing non-checkable bytes with spaces), and sent the masked text to the client. The new logic sends the full line text (buf:line_text(li)) for every line in the buffer, without any masking. Enchant will see code identifiers, punctuation, and multi-byte sequences, flagging them as misspellings.
Impact #
- correctness: Spell driver no longer masks lines before sending to enchant, causing enchant to flag code syntax as misspellings, resulting in false positives.
- performance: Checking unmasked lines increases CPU usage.
Recommended Fix #
Restore line masking: either keep the previous visible-window + mask logic, or at minimum mask all lines by replacing non-prose regions (comments, strings, code) with spaces before sending to enchant. The mask module should be re-integrated.
Commit range: e1360ee9..e1360ee9
Code Review: CR-2026-07-25-3