# HG changeset patch # User James D. Callahan III # Date 1363897421 18000 # Node ID fbd94a0be29ca6848c7e230afa129add146a437c # Parent e1566483082c12eff342bcf4ec832b7e79e016de Fix for units. diff -r e1566483082c -r fbd94a0be29c Comments.lua --- a/Comments.lua Thu Mar 21 15:11:34 2013 -0500 +++ b/Comments.lua Thu Mar 21 15:23:41 2013 -0500 @@ -197,7 +197,11 @@ end) local function CreateComment(cell, func) - func() + if _G.type(func) == "table" then + func[1](func[2]) + else + func() + end display = display:Release() end @@ -249,7 +253,7 @@ if unit_idnum then line = display:AddLine(("%s: %s"):format(unit_id:gsub("^%l", _G.string.upper), _G.UnitName(unit_id))) - display:SetLineScript(line, "OnMouseUp", CreateComment, CreateUnitComment) + display:SetLineScript(line, "OnMouseUp", CreateComment, { CreateUnitComment, unit_id }) end end end