aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/provider/python.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2026-09-16 12:37:56 +0100
committerLewis Russell <me@lewisr.dev>2026-09-18 17:24:24 +0100
commit9407d1b59d9f857c7bd28a8310664f06484bdcff (patch)
treee7707d296e02bbe202a8058ac561ef038740866f /runtime/lua/vim/provider/python.lua
parentcf09c38d756ad2fb2cce19431c58feea7772a52a (diff)
downloadrneovim-9407d1b59d9f857c7bd28a8310664f06484bdcff.tar.gz
rneovim-9407d1b59d9f857c7bd28a8310664f06484bdcff.tar.bz2
rneovim-9407d1b59d9f857c7bd28a8310664f06484bdcff.zip
fix(options): validate nvim_set_option_value() dry runs
Problem: nvim_set_option_value() with dry_run=true accepts invalid values such as foldmethod='nonsense'. Validation is mixed with side effects in the did_set_* callbacks, so dry runs skip it. Solution: Split value validation out of the did_set_* callbacks into separate validation_cb callbacks. Use these checks for both normal assignments and nvim_set_option_value() dry runs. Keep side effects in did_set_*. Replace direct foldenable/foldlevel assignments in C folding commands with setters. This gives C commands the same OptionSet and synchronization behavior as Lua assignments. Use normal setters for 'tabstop' and 'vartabstop' in :retab so C code indentation and folds based on indentation use the new tab widths. Direct assignments could leave them using the old widths. :retab temporarily turns off 'list' to calculate tab widths. Previously, :retab -1 reported an error and returned without restoring 'list'. Check the argument before turning 'list' off, so an invalid argument leaves the option unchanged. AI-assisted
Diffstat (limited to 'runtime/lua/vim/provider/python.lua')
0 files changed, 0 insertions, 0 deletions