Fixed bug with TA plugin when cursor is at the end of the file
This commit is contained in:
parent
f3db29e2c4
commit
d0ad1d9d0f
|
|
@ -114,8 +114,7 @@ local function runDCDClient(args)
|
||||||
local command = M.PATH_TO_DCD_CLIENT .. " " .. args
|
local command = M.PATH_TO_DCD_CLIENT .. " " .. args
|
||||||
.. " -c" .. buffer.current_pos .. " > \"" .. fileName .. "\""
|
.. " -c" .. buffer.current_pos .. " > \"" .. fileName .. "\""
|
||||||
local p = io.popen(command, mode)
|
local p = io.popen(command, mode)
|
||||||
|
p:write(buffer:get_text():sub(1, buffer.length))
|
||||||
p:write(buffer:get_text():gsub(string.format("%s$", buffer.length), ""))
|
|
||||||
p:flush()
|
p:flush()
|
||||||
p:close()
|
p:close()
|
||||||
local tmpFile = io.open(fileName, "r")
|
local tmpFile = io.open(fileName, "r")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue