aboutsummaryrefslogtreecommitdiff
path: root/modules/lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/lua')
-rw-r--r--modules/lua/commands.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/lua/commands.lua b/modules/lua/commands.lua
index b5d0c524..2130ff18 100644
--- a/modules/lua/commands.lua
+++ b/modules/lua/commands.lua
@@ -62,7 +62,9 @@ end
function run()
local buffer = buffer
local cmd = 'lua "'..buffer.filename..'" 2>&1'
- local out = io.popen(cmd):read('*all')
+ local p = io.popen(cmd)
+ local out = p:read('*all')
+ p:close()
textadept.print('> '..cmd..'\n'..out)
end