File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,8 @@ function DialogKey:OnGossipFrameUpdate(GossipFrame)
193193 end
194194 if tag then
195195 if self .db .numKeysForGossip then
196- local newText = (n % 10 ) .. " . " .. data .info [tag ]
196+ local oldText = data .info [tag ]
197+ local newText = (n % 10 ) .. " . " .. (oldText :match (" ^%d. (.+)$" ) or oldText )
197198 if self .db .riskyNumKeysForGossip then
198199 data .info [tag ] = newText -- this may not be safe, but it looks like the only somewhat reliable way to ensure the scrollbar is enabled when needed
199200 end
@@ -574,7 +575,9 @@ function DialogKey:EnumerateGossips()
574575 for i , frame in ipairs (self .frames ) do
575576 if not checkQuestsToHandle or questsToHandle [i ] then
576577 if n > 10 then break end
577- frame :SetText ((n % 10 ) .. " . " .. frame :GetText ())
578+ local oldText = frame :GetText ()
579+ local newText = (n % 10 ) .. " . " .. (oldText :match (" ^%d. (.+)$" ) or oldText )
580+ frame :SetText (newText )
578581
579582 -- Make the button taller if the text inside is wrapped to multiple lines
580583 frame :SetHeight (frame :GetFontString ():GetHeight () + 2 )
You can’t perform that action at this time.
0 commit comments