Fixed bug with TA plugin when cursor is at the end of the file

This commit is contained in:
Hackerpilot 2014-01-29 15:34:19 -08:00
parent 66eed25689
commit f3db29e2c4
1 changed files with 2 additions and 1 deletions

View File

@ -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")