Ensure that lines are highlighted when they contain an error
James Whitehead II [04-28-08 - 22:40]
Ensure that lines are highlighted when they contain an error
diff --git a/WowLua.lua b/WowLua.lua
index 3daaee2..3cf6901 100644
--- a/WowLua.lua
+++ b/WowLua.lua
@@ -496,6 +496,11 @@ end
function WowLua.UpdateLineNums(highlightNum)
-- highlightNum is the line number indicated by the error message
+ if highlightNum then
+ WowLua.highlightNum = highlightNum
+ else
+ highlightNum = WowLua.highlightNum
+ end
-- Since we know this is FAIAP enabled, we need to pass true in order
-- to get the raw values
@@ -511,8 +516,10 @@ function WowLua.UpdateLineNums(highlightNum)
local count = 1
for line in text:gmatch("([^\n]*\n?)") do
if #line > 0 then
+ ChatFrame1:AddMessage(count .. " hi: " .. tostring(highlightNum))
if count == highlightNum then
- linetext = linetext .. "|cffff2222" .. count .. "|r\n"
+ ChatFrame1:AddMessage("got highlight")
+ linetext = linetext .. "|cFFFF1111" .. count .. "|r" .. "\n"
else
linetext = linetext .. count .. "\n"
end
diff --git a/WowLua.xml b/WowLua.xml
index d717bc7..7226c35 100644
--- a/WowLua.xml
+++ b/WowLua.xml
@@ -445,7 +445,7 @@
self:ClearFocus();
</OnEscapePressed>
<OnTextChanged>
- self.highlightNum = nil
+ WowLua.highlightNum = nil
</OnTextChanged>
<OnCursorChanged>
ScrollingEdit_OnCursorChanged(x,y,w,h)