diff --git a/editors/textadept/modules/dmd/dcd.lua b/editors/textadept/modules/dmd/dcd.lua index 80a6d47..31efb24 100644 --- a/editors/textadept/modules/dmd/dcd.lua +++ b/editors/textadept/modules/dmd/dcd.lua @@ -114,7 +114,8 @@ local function runDCDClient(args) local command = M.PATH_TO_DCD_CLIENT .. " " .. args .. " -c" .. buffer.current_pos .. " > \"" .. fileName .. "\"" local p = io.popen(command, mode) - p:write(buffer:get_text()) + + p:write(buffer:get_text():gsub(string.format("%s$", buffer.length), "")) p:flush() p:close() local tmpFile = io.open(fileName, "r")