[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:
parent
f8fd88b96b
commit
1e590aa789
@ -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:
|
Notepad++ v6.6 new features and bug fixes:
|
||||||
|
|
||||||
1. Add session snapshot and periodic backup feature.
|
1. Add session snapshot and periodic backup feature.
|
||||||
|
Binary file not shown.
@ -28,10 +28,10 @@
|
|||||||
; Define the application name
|
; Define the application name
|
||||||
!define APPNAME "Notepad++"
|
!define APPNAME "Notepad++"
|
||||||
|
|
||||||
!define APPVERSION "6.6"
|
!define APPVERSION "6.6.1"
|
||||||
!define APPNAMEANDVERSION "${APPNAME} v${APPVERSION}"
|
!define APPNAMEANDVERSION "${APPNAME} v${APPVERSION}"
|
||||||
!define VERSION_MAJOR 6
|
!define VERSION_MAJOR 6
|
||||||
!define VERSION_MINOR 6
|
!define VERSION_MINOR 61
|
||||||
|
|
||||||
!define APPWEBSITE "http://notepad-plus-plus.org/"
|
!define APPWEBSITE "http://notepad-plus-plus.org/"
|
||||||
|
|
||||||
|
@ -198,6 +198,7 @@ class FunctionListPanel;
|
|||||||
class Notepad_plus {
|
class Notepad_plus {
|
||||||
|
|
||||||
friend class Notepad_plus_Window;
|
friend class Notepad_plus_Window;
|
||||||
|
friend class FileManager;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Notepad_plus();
|
Notepad_plus();
|
||||||
@ -332,7 +333,6 @@ private:
|
|||||||
ScintillaEditView _mainEditView;
|
ScintillaEditView _mainEditView;
|
||||||
ScintillaEditView _invisibleEditView; //for searches
|
ScintillaEditView _invisibleEditView; //for searches
|
||||||
ScintillaEditView _fileEditView; //for FileManager
|
ScintillaEditView _fileEditView; //for FileManager
|
||||||
|
|
||||||
ScintillaEditView *_pEditView;
|
ScintillaEditView *_pEditView;
|
||||||
ScintillaEditView *_pNonEditView;
|
ScintillaEditView *_pNonEditView;
|
||||||
|
|
||||||
|
@ -659,7 +659,6 @@ bool FileManager::backupCurrentBuffer()
|
|||||||
::ResetEvent(writeEvent);
|
::ResetEvent(writeEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
UniMode mode = buffer->getUnicodeMode();
|
UniMode mode = buffer->getUnicodeMode();
|
||||||
if (mode == uniCookie)
|
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
|
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"));
|
FILE *fp = UnicodeConvertor.fopen(fullpath, TEXT("wb"));
|
||||||
if (fp)
|
if (fp)
|
||||||
{
|
{
|
||||||
_pscratchTilla->execute(SCI_SETDOCPOINTER, 0, buffer->_doc); //generate new document
|
int lengthDoc = _pNotepadPlus->_pEditView->getCurrentDocLen();
|
||||||
|
char* buf = (char*)_pNotepadPlus->_pEditView->execute(SCI_GETCHARACTERPOINTER); //to get characters directly from Scintilla buffer
|
||||||
int lengthDoc = _pscratchTilla->getCurrentDocLen();
|
|
||||||
char* buf = (char*)_pscratchTilla->execute(SCI_GETCHARACTERPOINTER); //to get characters directly from Scintilla buffer
|
|
||||||
size_t items_written = 0;
|
size_t items_written = 0;
|
||||||
if (encoding == -1) //no special encoding; can be handled directly by Utf8_16_Write
|
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.
|
// 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
|
if(items_written == 1) // backup file has been saved
|
||||||
{
|
{
|
||||||
_pscratchTilla->execute(SCI_SETDOCPOINTER, 0, _scratchDocDefault);
|
|
||||||
buffer->setModifiedStatus(false);
|
buffer->setModifiedStatus(false);
|
||||||
result = true; //all done
|
result = true; //all done
|
||||||
|
|
||||||
::SetEvent(writeEvent);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// set to signaled state
|
// set to signaled state
|
||||||
::SetEvent(writeEvent);
|
if (::SetEvent(writeEvent) == NULL)
|
||||||
|
{
|
||||||
|
printStr(TEXT("oups!"));
|
||||||
|
}
|
||||||
|
// printStr(TEXT("Event released!"));
|
||||||
::CloseHandle(writeEvent);
|
::CloseHandle(writeEvent);
|
||||||
}
|
}
|
||||||
else // buffer dirty but unmodified
|
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"));
|
writeEvent = ::CreateEvent(NULL, TRUE, FALSE, TEXT("nppWrittingEvent"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{ //printStr(TEXT("Locked. I wait."));
|
||||||
if (::WaitForSingleObject(writeEvent, INFINITE) != WAIT_OBJECT_0)
|
if (::WaitForSingleObject(writeEvent, INFINITE) != WAIT_OBJECT_0)
|
||||||
{
|
{
|
||||||
// problem!!!
|
// problem!!!
|
||||||
|
@ -29,12 +29,12 @@
|
|||||||
#ifndef RESOURCE_H
|
#ifndef RESOURCE_H
|
||||||
#define 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
|
// 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")
|
// ex : #define VERSION_VALUE TEXT("5.63\0")
|
||||||
#define VERSION_VALUE TEXT("6.6\0")
|
#define VERSION_VALUE TEXT("6.61\0")
|
||||||
#define VERSION_DIGITALVALUE 6, 6, 0, 0
|
#define VERSION_DIGITALVALUE 6, 6, 1, 0
|
||||||
|
|
||||||
#ifdef UNICODE
|
#ifdef UNICODE
|
||||||
#define UNICODE_ANSI_MODE TEXT("(UNICODE)")
|
#define UNICODE_ANSI_MODE TEXT("(UNICODE)")
|
||||||
|
Loading…
Reference in New Issue
Block a user