diff --git a/PowerEditor/bin/change.log b/PowerEditor/bin/change.log index 6e9bf6762..7634c272a 100644 --- a/PowerEditor/bin/change.log +++ b/PowerEditor/bin/change.log @@ -1,3 +1,8 @@ +Notepad++ v6.6.1 bug fixes: + +1. Fix Notepad++ hanging issue while saving a large file if session snapshot feature is on. + + Notepad++ v6.6 new features and bug fixes: 1. Add session snapshot and periodic backup feature. diff --git a/PowerEditor/bin/npp.pdb b/PowerEditor/bin/npp.pdb index ae404eb62..93d98a0ae 100644 Binary files a/PowerEditor/bin/npp.pdb and b/PowerEditor/bin/npp.pdb differ diff --git a/PowerEditor/installer/nppSetup.nsi b/PowerEditor/installer/nppSetup.nsi index d00c0bb83..9f4926d19 100644 --- a/PowerEditor/installer/nppSetup.nsi +++ b/PowerEditor/installer/nppSetup.nsi @@ -28,10 +28,10 @@ ; Define the application name !define APPNAME "Notepad++" -!define APPVERSION "6.6" +!define APPVERSION "6.6.1" !define APPNAMEANDVERSION "${APPNAME} v${APPVERSION}" !define VERSION_MAJOR 6 -!define VERSION_MINOR 6 +!define VERSION_MINOR 61 !define APPWEBSITE "http://notepad-plus-plus.org/" diff --git a/PowerEditor/src/Notepad_plus.h b/PowerEditor/src/Notepad_plus.h index a706279ea..6c35e054a 100644 --- a/PowerEditor/src/Notepad_plus.h +++ b/PowerEditor/src/Notepad_plus.h @@ -198,6 +198,7 @@ class FunctionListPanel; class Notepad_plus { friend class Notepad_plus_Window; +friend class FileManager; public: Notepad_plus(); @@ -332,7 +333,6 @@ private: ScintillaEditView _mainEditView; ScintillaEditView _invisibleEditView; //for searches ScintillaEditView _fileEditView; //for FileManager - ScintillaEditView *_pEditView; ScintillaEditView *_pNonEditView; diff --git a/PowerEditor/src/ScitillaComponent/Buffer.cpp b/PowerEditor/src/ScitillaComponent/Buffer.cpp index f77ab8627..d1fc45da9 100644 --- a/PowerEditor/src/ScitillaComponent/Buffer.cpp +++ b/PowerEditor/src/ScitillaComponent/Buffer.cpp @@ -659,7 +659,6 @@ bool FileManager::backupCurrentBuffer() ::ResetEvent(writeEvent); } - UniMode mode = buffer->getUnicodeMode(); if (mode == uniCookie) mode = uni8Bit; //set the mode to ANSI to prevent converter from adding BOM and performing conversions, Scintilla's data can be copied directly @@ -709,10 +708,8 @@ bool FileManager::backupCurrentBuffer() FILE *fp = UnicodeConvertor.fopen(fullpath, TEXT("wb")); if (fp) { - _pscratchTilla->execute(SCI_SETDOCPOINTER, 0, buffer->_doc); //generate new document - - int lengthDoc = _pscratchTilla->getCurrentDocLen(); - char* buf = (char*)_pscratchTilla->execute(SCI_GETCHARACTERPOINTER); //to get characters directly from Scintilla buffer + int lengthDoc = _pNotepadPlus->_pEditView->getCurrentDocLen(); + char* buf = (char*)_pNotepadPlus->_pEditView->execute(SCI_GETCHARACTERPOINTER); //to get characters directly from Scintilla buffer size_t items_written = 0; if (encoding == -1) //no special encoding; can be handled directly by Utf8_16_Write { @@ -744,15 +741,16 @@ bool FileManager::backupCurrentBuffer() // Note that fwrite() doesn't return the number of bytes written, but rather the number of ITEMS. if(items_written == 1) // backup file has been saved { - _pscratchTilla->execute(SCI_SETDOCPOINTER, 0, _scratchDocDefault); buffer->setModifiedStatus(false); result = true; //all done - - ::SetEvent(writeEvent); } } // set to signaled state - ::SetEvent(writeEvent); + if (::SetEvent(writeEvent) == NULL) + { + printStr(TEXT("oups!")); + } + // printStr(TEXT("Event released!")); ::CloseHandle(writeEvent); } else // buffer dirty but unmodified @@ -794,7 +792,7 @@ bool FileManager::deleteCurrentBufferBackup() // no thread yet, create a event with non-signaled, to block all threads writeEvent = ::CreateEvent(NULL, TRUE, FALSE, TEXT("nppWrittingEvent")); } - else + else { if (::WaitForSingleObject(writeEvent, INFINITE) != WAIT_OBJECT_0) { @@ -833,7 +831,7 @@ bool FileManager::saveBuffer(BufferID id, const TCHAR * filename, bool isCopy, g writeEvent = ::CreateEvent(NULL, TRUE, FALSE, TEXT("nppWrittingEvent")); } else - { + { //printStr(TEXT("Locked. I wait.")); if (::WaitForSingleObject(writeEvent, INFINITE) != WAIT_OBJECT_0) { // problem!!! diff --git a/PowerEditor/src/resource.h b/PowerEditor/src/resource.h index efcbbf8ad..f9db4c876 100644 --- a/PowerEditor/src/resource.h +++ b/PowerEditor/src/resource.h @@ -29,12 +29,12 @@ #ifndef RESOURCE_H #define RESOURCE_H -#define NOTEPAD_PLUS_VERSION TEXT("Notepad++ v6.6") +#define NOTEPAD_PLUS_VERSION TEXT("Notepad++ v6.6.1") // should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71 // ex : #define VERSION_VALUE TEXT("5.63\0") -#define VERSION_VALUE TEXT("6.6\0") -#define VERSION_DIGITALVALUE 6, 6, 0, 0 +#define VERSION_VALUE TEXT("6.61\0") +#define VERSION_DIGITALVALUE 6, 6, 1, 0 #ifdef UNICODE #define UNICODE_ANSI_MODE TEXT("(UNICODE)")