New misc feature: fix to blizzard bug with auto complete menu
This commit is contained in:
parent
727108f466
commit
183e59eb71
2 changed files with 56 additions and 0 deletions
|
@ -430,3 +430,35 @@ end
|
||||||
-- 48646,48645,48644,48643,48642,48616,48615,48614,48613,48612,48584,48583,48582,48581,48580,48547,48546,48545,48544,48543,48490,48489,48488,48487,48486,48455,48453,48451,48447,48433,48385,48384,48383,48382,48381,48355,48354,48353,48352,48351,48325,48324,48323,48322,48321,48294,48293,48292,48291,48290,48264,48263,48262,48261,48260,48232,48231,48230,48229,48228,48207,48206,48205,48204,48203,48172,48171,48170,48169,48168,48142,48141,48140,48139,48138,48086,48085,48084,48083,48082,48037,48035,48033,48031,48029,47792,47791,47790,47789,47788,47762,47761,47760,47759,47758,
|
-- 48646,48645,48644,48643,48642,48616,48615,48614,48613,48612,48584,48583,48582,48581,48580,48547,48546,48545,48544,48543,48490,48489,48488,48487,48486,48455,48453,48451,48447,48433,48385,48384,48383,48382,48381,48355,48354,48353,48352,48351,48325,48324,48323,48322,48321,48294,48293,48292,48291,48290,48264,48263,48262,48261,48260,48232,48231,48230,48229,48228,48207,48206,48205,48204,48203,48172,48171,48170,48169,48168,48142,48141,48140,48139,48138,48086,48085,48084,48083,48082,48037,48035,48033,48031,48029,47792,47791,47790,47789,47788,47762,47761,47760,47759,47758,
|
||||||
-- }
|
-- }
|
||||||
|
|
||||||
|
-- Used these for debugging auto complete problem ------------------------------
|
||||||
|
function ChatHooky(func)
|
||||||
|
if not _G[func] then return end
|
||||||
|
|
||||||
|
local old = _G[func]
|
||||||
|
_G[func] = function(...)
|
||||||
|
print("----"..func.."----")
|
||||||
|
|
||||||
|
local t = ...
|
||||||
|
if t == ChatFrame1EditBox then
|
||||||
|
print("Before GetText():", t:GetText())
|
||||||
|
end
|
||||||
|
|
||||||
|
print("Params:", ...)
|
||||||
|
local r = old(...)
|
||||||
|
print("Return value:", r)
|
||||||
|
|
||||||
|
if t == ChatFrame1EditBox then
|
||||||
|
print("After GetText():", t:GetText())
|
||||||
|
end
|
||||||
|
|
||||||
|
print("----/"..func.."----")
|
||||||
|
|
||||||
|
return r
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- ChatHooky("ChatEdit_ParseText")
|
||||||
|
-- ChatHooky("ChatEdit_SendText")
|
||||||
|
-- ChatHooky("ChatEdit_HandleChatType")
|
||||||
|
-- ChatHooky("ChatEdit_ExtractTellTarget")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -282,3 +282,27 @@ function mod:AchievementFrame_LoadUI(...)
|
||||||
self:Unhook("AchievementFrame_LoadUI")
|
self:Unhook("AchievementFrame_LoadUI")
|
||||||
return unpack(args);
|
return unpack(args);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Fix to typing /w chi<cr> with auto complete ---------------------------------
|
||||||
|
-- change our OnEscapePressed to Reset
|
||||||
|
function ChatEdit_OnEscapePressed(editBox)
|
||||||
|
ChatEdit_ResetChatTypeToSticky(editBox);
|
||||||
|
if ( not editBox.isGM and (GetCVar("chatStyle") ~= "im" or editBox == MacroEditBox) ) then
|
||||||
|
editBox:SetText("");
|
||||||
|
editBox:Hide();
|
||||||
|
else
|
||||||
|
ChatEdit_DeactivateChat(editBox);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- change the editbox's OnEscape to a real OnEscape
|
||||||
|
for i=1,NUM_CHAT_WINDOWS do
|
||||||
|
local f = _G["ChatFrame"..i.."EditBox"]
|
||||||
|
if f then
|
||||||
|
f:SetScript("OnEscapePressed", function(editBox)
|
||||||
|
if ( not AutoCompleteEditBox_OnEscapePressed(editBox) ) then
|
||||||
|
ChatEdit_OnEscapePressed(editBox)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in a new issue