diff options
| author | Lewis Russell <lewis6991@gmail.com> | 2026-09-22 16:57:25 +0100 |
|---|---|---|
| committer | Lewis Russell <me@lewisr.dev> | 2026-09-24 10:57:09 +0100 |
| commit | ac8ee88a219068784d33cd35bc73700ce4bcf319 (patch) | |
| tree | b5e392470d306740b05d45067653caa92e701702 /runtime/lua | |
| parent | ea1fc6ba3f0ff475c8d710ccd233caf55859c594 (diff) | |
| download | rneovim-ac8ee88a219068784d33cd35bc73700ce4bcf319.tar.gz rneovim-ac8ee88a219068784d33cd35bc73700ce4bcf319.tar.bz2 rneovim-ac8ee88a219068784d33cd35bc73700ce4bcf319.zip | |
fix(options): reject restricted assignments before parsing callbacks
Problem:
A restricted option assignment parses its callback before
rejecting the change. A Syntax handler triggered by a modeline can
therefore evaluate bound arguments even though the option cannot be
changed.
Introduced by 726d1a92d2. That change moved callback construction
from did_set_operatorfunc(), after the permission check, into validation
and storage, before did_set_option() checks permissions.
Solution:
Check permissions before parsing the callback, preserving the
existing option value without evaluating the rejected expression.
AI-assisted
Diffstat (limited to 'runtime/lua')
0 files changed, 0 insertions, 0 deletions