Project-Diablo-2 / BH

A modified version of slashdiablo's BH for Project Diablo 2
GNU Affero General Public License v3.0
23 stars 23 forks source link

Fix glide colors not being counted in filter text #43

Closed xkanzeon closed 6 months ago

xkanzeon commented 6 months ago

This should fix certain filter-adjusted item names being cut off early.

The regex string for making this count wasn't being built properly, so this change uses an explicit string that matches both ddraw and glide color formats regardless of used mode. This leaves colorreps unused (and seemingly redundant to COLOR_REPLACEMENTS), so I pulled it out.

This can also be fixed by keeping a full list of colors (ddraw and glide) in colorreps and continuing to use the join().

Both methods were tested (admittedly briefly) and working, but if the latter is preferred, I don't mind switching.

Kudos to Cy for actually hunting this one down.