Minor code improvement
parent
460b2b60f6
commit
a81d39fa6e
|
@ -8759,14 +8759,13 @@ void Notepad_plus::clearChangesHistory()
|
|||
Sci_Position pos = (Sci_Position)::SendMessage(_pEditView->getHSelf(), SCI_GETCURRENTPOS, 0, 0);
|
||||
int chFlags = (int)::SendMessage(_pEditView->getHSelf(), SCI_GETCHANGEHISTORY, 0, 0);
|
||||
|
||||
SendMessage(_pEditView->getHSelf(), SCI_EMPTYUNDOBUFFER, 0, 0);
|
||||
SendMessage(_pEditView->getHSelf(), SCI_SETCHANGEHISTORY, SC_CHANGE_HISTORY_DISABLED, 0);
|
||||
|
||||
SendMessage(_pEditView->getHSelf(), SCI_SETCHANGEHISTORY, chFlags, 0);
|
||||
SendMessage(_pEditView->getHSelf(), SCI_GOTOPOS, pos, 0);
|
||||
_pEditView->execute(SCI_EMPTYUNDOBUFFER);
|
||||
_pEditView->execute(SCI_SETCHANGEHISTORY, SC_CHANGE_HISTORY_DISABLED);
|
||||
_pEditView->execute(SCI_SETCHANGEHISTORY, chFlags);
|
||||
_pEditView->execute(SCI_GOTOPOS, pos);
|
||||
|
||||
checkUndoState();
|
||||
_pNonEditView->redraw();
|
||||
_pNonEditView->redraw(); // Prevent clonned document visual glichy on another view
|
||||
}
|
||||
|
||||
// Based on https://github.com/notepad-plus-plus/notepad-plus-plus/issues/12248#issuecomment-1258561261.
|
||||
|
|
Loading…
Reference in New Issue