diff options
author | Florian Fischer <florian.fischer@muhq.space> | 2023-10-05 16:26:45 +0200 |
---|---|---|
committer | Florian Fischer <florian.fischer@muhq.space> | 2023-10-05 16:26:45 +0200 |
commit | 8983b5f9a54e180e1df5167811b6432de1721d5e (patch) | |
tree | eb41046c538e4f29bb09c587f4b88e2bc618ddb2 | |
parent | d99ec6bb31b042bf0b6111c20d622f64636d2ed6 (diff) | |
download | vis-editorconfig-8983b5f9a54e180e1df5167811b6432de1721d5e.tar.gz |
declare function-local variables as local
Lua uses the global scope per default.
To not clutter the global namespace define function-local variables as
local.
-rw-r--r-- | edconf.lua | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -166,9 +166,9 @@ OPTIONS = { -- Compatible with editorconfig-core-lua v0.3.0 function ec_iter(p) - i = 0 - props, keys = ec.parse(p) - n = #keys + local i = 0 + local props, keys = ec.parse(p) + local n = #keys return function () i = i + 1 if i <= n then |