aboutsummaryrefslogtreecommitdiffstats
path: root/edconf.lua
diff options
context:
space:
mode:
authorFrank Seifferth <frankseifferth@posteo.net>2023-10-08 12:51:42 +0200
committerFrank Seifferth <frankseifferth@posteo.net>2023-10-08 12:54:48 +0200
commitc08d52fa67da259f07c56e6f82501e9d32515285 (patch)
treefceea703d2e1976a025b0a3d9b5cbb17f08b83a4 /edconf.lua
parent3c0cf316a1aa6e3fd83e2bade098eced3819e1d9 (diff)
downloadvis-editorconfig-c08d52fa67da259f07c56e6f82501e9d32515285.tar.gz
Inline ec_parse_cmd function
Diffstat (limited to 'edconf.lua')
-rw-r--r--edconf.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/edconf.lua b/edconf.lua
index 3d95146..cb92d54 100644
--- a/edconf.lua
+++ b/edconf.lua
@@ -193,8 +193,9 @@ local function ec_set_values(file)
end
end
-local function ec_parse_cmd() ec_set_values(vis.win.file) end
-vis:command_register("econfig_parse", ec_parse_cmd, "(Re)parse an editorconfig file")
+vis:command_register("econfig_parse", function()
+ ec_set_values(vis.win.file)
+end, "(Re)parse an editorconfig file")
vis.events.subscribe(vis.events.FILE_OPEN, function (file)
ec_set_values(file)