From d4af3e994aad3090854061da67ed368b01506359 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Sat, 7 Sep 2013 17:08:51 +0000 Subject: [PATCH] Fixed popen mode for windows and non-windows --- editors/textadept/modules/dmd/dcd.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editors/textadept/modules/dmd/dcd.lua b/editors/textadept/modules/dmd/dcd.lua index 4656e21..2234f42 100644 --- a/editors/textadept/modules/dmd/dcd.lua +++ b/editors/textadept/modules/dmd/dcd.lua @@ -113,7 +113,11 @@ function M.autocomplete(ch) if buffer:get_lexer() ~= "dmd" then return end local fileName = os.tmpname() local command = M.PATH_TO_DCD_CLIENT .. " -c" .. buffer.current_pos .. " > " .. fileName - local p = io.popen(command, "wb") + local mode = "w" + if _G.WIN32 then + mode = "wb" + end + local p = io.popen(command, mode) p:write(buffer:get_text()) p:flush() p:close()