Fixes the undo and redo interaction with the text editor operations such as toggle comments, indent right, indent left e.t.c as mentioned here and here.