aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/editorconfig.lua
diff options
context:
space:
mode:
authorBogdan Grigoruță <43993819+krady21@users.noreply.github.com>2023-05-03 21:26:40 +0300
committerGitHub <noreply@github.com>2023-05-03 12:26:40 -0600
commit143a1783328074a5167d9619aff2a8ee9c2ca481 (patch)
tree11aa9a6773d6cb9ebc918c54eb987d0ad1658045 /runtime/lua/editorconfig.lua
parent39caf86e8aa0f6bd803b538b2d864f7dc94fc8dd (diff)
downloadrneovim-143a1783328074a5167d9619aff2a8ee9c2ca481.tar.gz
rneovim-143a1783328074a5167d9619aff2a8ee9c2ca481.tar.bz2
rneovim-143a1783328074a5167d9619aff2a8ee9c2ca481.zip
fix(editorconfig): add missing root validation (#23462)
Diffstat (limited to 'runtime/lua/editorconfig.lua')
-rw-r--r--runtime/lua/editorconfig.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/lua/editorconfig.lua b/runtime/lua/editorconfig.lua
index 5188c13284..a4024e5e7a 100644
--- a/runtime/lua/editorconfig.lua
+++ b/runtime/lua/editorconfig.lua
@@ -189,6 +189,7 @@ local function parse(filepath, dir)
end
elseif key ~= nil and val ~= nil then
if key == 'root' then
+ assert(val == 'true' or val == 'false', 'root must be either "true" or "false"')
opts.root = val == 'true'
elseif pat and pat:match_str(filepath) then
opts[key] = val