From 94bddd5a85304eae22a9443cfc2c77c6289c4293 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sat, 31 Oct 2015 14:54:32 +0100 Subject: [PATCH] Fix crash due to backups and session snapshots (Closes #1070) When backups and session snapshots feature is enabled, batch modification a big file could make Notepad++ crash. The solution is to prevent from backing up modified file during the operation of batch modification. --- PowerEditor/src/Notepad_plus.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 3b50f0da3..1f4a7b7ad 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -47,6 +47,7 @@ #include "ProjectPanel.h" #include "documentMap.h" #include "functionListPanel.h" +#include "LongRunningOperation.h" using namespace std; @@ -1939,6 +1940,8 @@ void Notepad_plus::copyMarkedLines() void Notepad_plus::cutMarkedLines() { + LongRunningOperation op; + int lastLine = _pEditView->lastZeroBasedLineNumber(); generic_string globalStr = TEXT(""); @@ -1959,6 +1962,8 @@ void Notepad_plus::cutMarkedLines() void Notepad_plus::deleteMarkedLines(bool isMarked) { + LongRunningOperation op; + int lastLine = _pEditView->lastZeroBasedLineNumber(); _pEditView->execute(SCI_BEGINUNDOACTION); @@ -1972,6 +1977,8 @@ void Notepad_plus::deleteMarkedLines(bool isMarked) void Notepad_plus::pasteToMarkedLines() { + LongRunningOperation op; + int clipFormat; clipFormat = CF_UNICODETEXT;