vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit be4f21dff00396f6c16a9ceed853a4434a0924b9 parent e563242e43db934f7a89789d026291342c8208bf Author: Casper Ti. Vector <CasperVector@gmail.com> Date: Wed, 24 Jan 2018 11:22:33 +0100 lua: reap the zombie after io.popen() Close #655 Diffstat:
| M | lua/plugins/filetype.lua | | | 1 | + |
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git 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