* Override UndoManager to allow disabling if feature causes issues
* See https://github.com/bobbylight/RSyntaxTextArea/issues/19
*/
@Override
protected RUndoManager createUndoManager() {
RUndoManager undoManager = super.createUndoManager();
if(disableUndo) {
undoManager.setLimit(0);
} else {
undoManager.setLimit(MAX_UNDOS);
}
return undoManager;
}