Issue #8: Must use binary popen to avoid CRLF screwing everything up.

This commit is contained in:
Hackerpilot 2013-09-01 03:01:46 -07:00
parent 8cc0f2546d
commit 61ec081805
2 changed files with 3 additions and 3 deletions

View File

@ -111,7 +111,7 @@ function M.autocomplete(ch)
if buffer:get_lexer() ~= "dmd" then return end if buffer:get_lexer() ~= "dmd" then return end
local fileName = os.tmpname() local fileName = os.tmpname()
local command = M.PATH_TO_DCD_CLIENT .. " -c" .. buffer.current_pos .. " > " .. fileName local command = M.PATH_TO_DCD_CLIENT .. " -c" .. buffer.current_pos .. " > " .. fileName
local p = io.popen(command, "w") local p = io.popen(command, "wb")
p:write(buffer:get_text()) p:write(buffer:get_text())
p:flush() p:flush()
p:close() p:close()

View File

@ -34,11 +34,11 @@ import modulecache;
version(Posix) version(Posix)
{ {
enum CONFIG_FILE_PATH = "~/.config/dcd"; enum CONFIG_FILE_PATH = "~/.config/dcd";
} }
else version(Windows) else version(Windows)
{ {
enum CONFIG_FILE_PATH = "dcd.conf"; enum CONFIG_FILE_PATH = "dcd.conf";
} }
int main(string[] args) int main(string[] args)