diff --git a/lua/plugins/filetype.lua b/lua/plugins/filetype.lua index f5c080088..dfbf2b0f0 100644 --- a/lua/plugins/filetype.lua +++ b/lua/plugins/filetype.lua @@ -459,6 +459,7 @@ vis.events.subscribe(vis.events.WIN_OPEN, function(win) local file = io.popen(string.format("file -bL --mime-type -- '%s'", name:gsub("'", "'\\''"))) if file then local mime = file:read('*all') + file:close() if mime then mime = mime:gsub('%s*$', '') end