Multiple/Last StyleNeeded Calls

Topics: User Forum
Dec 20, 2010 at 4:39 AM

Is there any way to hook the last StyleNeeded call for a given event? I've been having some odd problems using this event. For example, when changing a character in the first line of the document, I'll get a single style needed call for that line and then anywhere from 7-40(!) calls to change lines 3 & 4. I've been trying to do multi-line comment styling only when the text is actually changed (because scrolling the document makes so many StyleNeeded calls that trying to process comments during scrolling noticeably slows it down). Which kind of works, until the flood of other StyleNeeded calls to unrelated lines overwrites my comment section styles.

So, is there any way, for a given TextChanged event, to catch whatever the last StyleNeeded call will be? Or any reasoning behind 20 calls being dispatched for a character entered, when one call encompassing whatever may need updated would suffice?

Thanks!