[RELEASE] Notepad++ 6.6.1 Release (Workers' Day Edition).

[BUG_FIXED] Fix Notepad++ hanging issue while saving a large file if session snapshot feature is on.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1233 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2014-05-04 20:37:54 +00:00
parent f8fd88b96b
commit 1e590aa789
6 changed files with 20 additions and 17 deletions

View File

@ -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.

Binary file not shown.

View File

@ -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/"

View File

@ -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;

View File

@ -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
@ -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!!!

View File

@ -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)")