paissaheavyindustries / Triggernometry

Triggernometry is a plugin for Advanced Combat Tracker, intended to extend its built-in trigger system with a variety of different actions and configuration options.
MIT License
253 stars 48 forks source link

Preview Labels of Triggers and Conditions Have No Length Limit #90

Closed MnFeN closed 10 months ago

MnFeN commented 1 year ago

When the mouse cursor is put onto a trigger, a trigger action, or a trigger condition, it shows a preview text label.

This label for a trigger action has a length limit of ~256 characters, otherwise, it would use ... to omit the extra characters. But the label for triggers/trigger conditions has no limit. When the text is too long, it will let the ACT stuck or even crash when trying to preview it, e.g. 4 K characters cost ~10 seconds to show the label on my computer, as shown below.

image

This happened when I was writing a long regular expression (~ 100 K characters) in a trigger condition (I know it is not a common usage for triggers lol). The trigger could match the regex almost immediately; but when I tried to put the cursor onto the condition to edit it, it crashed the ACT.

Also, the message box when deleting such a trigger or condition also shows all the characters.

MnFeN commented 10 months ago

Fixed in #98.
Restricted the length of the two condition descriptions.

(The preview textbox for triggers was left unchanged because its name should usually be kept short.)