It's known that when user types in a series of characters, the text change for every character typed is going to be merged into a single undo action in the undo stack. This is good for performance.
In our context, there is a need to separate them in some circumstances. For example, if user types in 'if(a == b)', I need serveral undo actions. one for 'if', one for '(', one for 'a ', one for '==', one for ' b' and one for ')'.
Is there a way for me to define a list of words that prevent the merge for 'Typing' text changes, if a 'Typing' text change begins with one of those words in the defined list?