As enable change history has no effect when there are undo history, it seems better to auto enable it after save point is reached.
single line addition in Editor::NotifySavePoint(bool isSavePoint):
if (changeHistoryOption != ChangeHistoryOption::Disabled) {
pdoc->ChangeHistorySet(FlagSet(changeHistoryOption, ChangeHistoryOption::Enabled));
Redraw();
}
The benefit is unclear - it seems to just relax the order of calls slightly.
If not set here, application that allows enable/disable change history will need to set it in
SCN_SAVEPOINTREACHED.But it won't work in general for
SCN_SAVEPOINTREACHEDonly at the point undo is enabled so why wouldn't the application enable change history when enabling undo?I'm not understanding the point of this change so won't be including it.