Fix possible file corruption during macro playback

closes #1007, closes #919, closes #834
When backups are enabled, playing back a macro that takes a while can
corrupt a file (see the mentioned issues). I tested this with a ~100,000
line text file, ~3.3MB in size. Created a macro of Down5, Delete10. Played
this till the end of the file. Took about 20s to run so it had a few
backup cycles during it. Reproduced it fairly easily and never had it
happen after this adjustment.
This commit is contained in:
dail8859 2015-10-23 21:48:11 -04:00 committed by Don Ho
parent 6f9c845c17
commit 7781f1d03e

View File

@ -42,6 +42,8 @@ using namespace std;
void Notepad_plus::macroPlayback(Macro macro)
{
LongRunningOperation op;
_pEditView->execute(SCI_BEGINUNDOACTION);
for (Macro::iterator step = macro.begin(); step != macro.end(); ++step)