From 02bdca868967fb8ebb2ed4604b6f15fa360f1a68 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Mon, 28 Apr 2008 22:40:22 +0000 Subject: [PATCH] Ensure that lines are highlighted when they contain an error --- WowLua.lua | 9 ++++++++- WowLua.xml | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) 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(); - self.highlightNum = nil + WowLua.highlightNum = nil ScrollingEdit_OnCursorChanged(x,y,w,h) -- 1.7.9.5