From d0ad1d9d0f2797bbd07b6792fc15dc65f67c0591 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Wed, 29 Jan 2014 15:34:51 -0800 Subject: [PATCH] Fixed bug with TA plugin when cursor is at the end of the file --- editors/textadept/modules/dmd/dcd.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/editors/textadept/modules/dmd/dcd.lua b/editors/textadept/modules/dmd/dcd.lua index 31efb24..212b7e9 100644 --- a/editors/textadept/modules/dmd/dcd.lua +++ b/editors/textadept/modules/dmd/dcd.lua @@ -114,8 +114,7 @@ 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():gsub(string.format("%s$", buffer.length), "")) + p:write(buffer:get_text():sub(1, buffer.length)) p:flush() p:close() local tmpFile = io.open(fileName, "r")