mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-28 16:24:27 +02:00
[BUG_FIXED] 1. Fix the crash issue clipboard history under XP while there is no data in Clipboard.
2. Fix the wrong assignment for 2 members of std::string type in Buffer class. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@771 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
903788f9bd
commit
6578a2219f
@ -103,6 +103,8 @@ copy /Y "..\bin\plugins\NppExport.dll" .\zipped.package.release\unicode\plugins\
|
|||||||
If ErrorLevel 1 PAUSE
|
If ErrorLevel 1 PAUSE
|
||||||
copy /Y "..\bin\plugins\ComparePlugin.dll" .\zipped.package.release\unicode\plugins\
|
copy /Y "..\bin\plugins\ComparePlugin.dll" .\zipped.package.release\unicode\plugins\
|
||||||
If ErrorLevel 1 PAUSE
|
If ErrorLevel 1 PAUSE
|
||||||
|
copy /Y "..\bin\plugins\NppConverter.dll" .\zipped.package.release\unicode\plugins\
|
||||||
|
If ErrorLevel 1 PAUSE
|
||||||
|
|
||||||
rem plugins manager and its updater
|
rem plugins manager and its updater
|
||||||
copy /Y "..\bin\plugins\PluginManager.dll" .\zipped.package.release\unicode\plugins\
|
copy /Y "..\bin\plugins\PluginManager.dll" .\zipped.package.release\unicode\plugins\
|
||||||
|
@ -47,8 +47,8 @@ Buffer::Buffer(FileManager * pManager, BufferID id, Document doc, DocFileStatus
|
|||||||
if (_encoding != -1)
|
if (_encoding != -1)
|
||||||
_unicodeMode = uniCookie;
|
_unicodeMode = uniCookie;
|
||||||
|
|
||||||
_userLangExt[0] = 0;
|
_userLangExt = TEXT("");
|
||||||
_fullPathName[0] = 0;
|
_fullPathName = TEXT("");
|
||||||
_fileName = NULL;
|
_fileName = NULL;
|
||||||
setFileName(fileName, ndds._lang);
|
setFileName(fileName, ndds._lang);
|
||||||
updateTimeStamp();
|
updateTimeStamp();
|
||||||
|
@ -124,6 +124,8 @@ StringArray::StringArray(ClipboardData cd, size_t maxLen)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Search clipboard data in internal storage
|
||||||
|
// return -1 if not found, else return the index of internal array
|
||||||
int ClipboardHistoryPanel::getClipboardDataIndex(ClipboardData cbd)
|
int ClipboardHistoryPanel::getClipboardDataIndex(ClipboardData cbd)
|
||||||
{
|
{
|
||||||
int iFound = -1;
|
int iFound = -1;
|
||||||
@ -176,7 +178,7 @@ BOOL CALLBACK ClipboardHistoryPanel::run_dlgProc(UINT message, WPARAM wParam, LP
|
|||||||
case WM_INITDIALOG :
|
case WM_INITDIALOG :
|
||||||
{
|
{
|
||||||
_hwndNextCbViewer = ::SetClipboardViewer(_hSelf);
|
_hwndNextCbViewer = ::SetClipboardViewer(_hSelf);
|
||||||
break;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
case WM_CHANGECBCHAIN:
|
case WM_CHANGECBCHAIN:
|
||||||
@ -184,18 +186,22 @@ BOOL CALLBACK ClipboardHistoryPanel::run_dlgProc(UINT message, WPARAM wParam, LP
|
|||||||
_hwndNextCbViewer = (HWND)lParam;
|
_hwndNextCbViewer = (HWND)lParam;
|
||||||
else if (_hwndNextCbViewer)
|
else if (_hwndNextCbViewer)
|
||||||
::SendMessage(_hwndNextCbViewer, message, wParam, lParam);
|
::SendMessage(_hwndNextCbViewer, message, wParam, lParam);
|
||||||
break;
|
return TRUE;
|
||||||
|
|
||||||
case WM_DRAWCLIPBOARD :
|
case WM_DRAWCLIPBOARD :
|
||||||
{
|
{
|
||||||
//::MessageBoxA(NULL, "Catch u", "", MB_OK);
|
|
||||||
ClipboardData clipboardData = getClipboadData();
|
ClipboardData clipboardData = getClipboadData();
|
||||||
addToClipboadHistory(clipboardData);
|
if (clipboardData.size())
|
||||||
|
addToClipboadHistory(clipboardData);
|
||||||
if (_hwndNextCbViewer)
|
if (_hwndNextCbViewer)
|
||||||
::SendMessage(_hwndNextCbViewer, message, wParam, lParam);
|
::SendMessage(_hwndNextCbViewer, message, wParam, lParam);
|
||||||
break;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case WM_DESTROY:
|
||||||
|
::ChangeClipboardChain(_hSelf, _hwndNextCbViewer);
|
||||||
|
break;
|
||||||
|
|
||||||
case WM_COMMAND :
|
case WM_COMMAND :
|
||||||
{
|
{
|
||||||
switch (LOWORD(wParam))
|
switch (LOWORD(wParam))
|
||||||
@ -254,9 +260,6 @@ BOOL CALLBACK ClipboardHistoryPanel::run_dlgProc(UINT message, WPARAM wParam, LP
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
case WM_DESTROY:
|
|
||||||
::ChangeClipboardChain(_hSelf, _hwndNextCbViewer);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default :
|
default :
|
||||||
return DockingDlgInterface::run_dlgProc(message, wParam, lParam);
|
return DockingDlgInterface::run_dlgProc(message, wParam, lParam);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user