[BUG_FIXED] Fix the bug the Notepad++ is launched several instances but show nothing.
Fix Find in files regression : Panel doesn't take Unicode. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@438 f5eea248-9336-0410-98b8-ebc06183d4e3pull/343/head^2
parent
c6a0498215
commit
8887ef1328
|
@ -7719,11 +7719,16 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
||||||
return _pEditView->getCurrentColumnNumber();
|
return _pEditView->getCurrentColumnNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
case NPPM_GETCURRENTSCINTILLA :
|
case NPPM_GETCURRENTSCINTILLA :
|
||||||
{
|
{
|
||||||
*((int *)lParam) = (_pEditView == &_mainEditView)?0:1;
|
if (_pEditView == &_mainEditView)
|
||||||
return TRUE;
|
*((int *)lParam) = MAIN_VIEW;
|
||||||
}
|
else if (_pEditView == &_subEditView)
|
||||||
|
*((int *)lParam) = SUB_VIEW;
|
||||||
|
else
|
||||||
|
*((int *)lParam) = -1;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
case NPPM_GETCURRENTLANGTYPE :
|
case NPPM_GETCURRENTLANGTYPE :
|
||||||
{
|
{
|
||||||
|
|
|
@ -1528,7 +1528,7 @@ void FindReplaceDlg::findAllIn(InWhat op)
|
||||||
originalFinderProc = SetWindowLong( _pFinder->_scintView.getHSelf(), GWL_WNDPROC, (LONG) finderProc);
|
originalFinderProc = SetWindowLong( _pFinder->_scintView.getHSelf(), GWL_WNDPROC, (LONG) finderProc);
|
||||||
|
|
||||||
_pFinder->setFinderReadOnly(true);
|
_pFinder->setFinderReadOnly(true);
|
||||||
_pFinder->_scintView.execute(SCI_SETCODEPAGE, SC_CP_DBCS);
|
_pFinder->_scintView.execute(SCI_SETCODEPAGE, SC_CP_UTF8);
|
||||||
_pFinder->_scintView.execute(SCI_USEPOPUP, FALSE);
|
_pFinder->_scintView.execute(SCI_USEPOPUP, FALSE);
|
||||||
_pFinder->_scintView.execute(SCI_SETUNDOCOLLECTION, false); //dont store any undo information
|
_pFinder->_scintView.execute(SCI_SETUNDOCOLLECTION, false); //dont store any undo information
|
||||||
_pFinder->_scintView.execute(SCI_SETCARETLINEVISIBLE, 1);
|
_pFinder->_scintView.execute(SCI_SETCARETLINEVISIBLE, 1);
|
||||||
|
|
|
@ -955,7 +955,7 @@ void ScintillaEditView::defineDocType(LangType typeDoc)
|
||||||
setSpecialIndicator(*pStyle);
|
setSpecialIndicator(*pStyle);
|
||||||
|
|
||||||
defaultIndicatorStyle._styleID = SCE_UNIVERSAL_TAGMATCH;
|
defaultIndicatorStyle._styleID = SCE_UNIVERSAL_TAGMATCH;
|
||||||
defaultIndicatorStyle._bgColor = RGB(0x00, 0x80, 0xFF);
|
defaultIndicatorStyle._bgColor = RGB(0x80, 0x00, 0xFF);
|
||||||
pStyle = &defaultIndicatorStyle;
|
pStyle = &defaultIndicatorStyle;
|
||||||
iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_TAGMATCH);
|
iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_TAGMATCH);
|
||||||
if (iFind != -1)
|
if (iFind != -1)
|
||||||
|
|
|
@ -253,7 +253,7 @@ public:
|
||||||
setLineNumberWidth(willBeShowed);
|
setLineNumberWidth(willBeShowed);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int width = 4;
|
int width = 3;
|
||||||
if (whichMarge == _SC_MARGE_SYBOLE || whichMarge == _SC_MARGE_FOLDER)
|
if (whichMarge == _SC_MARGE_SYBOLE || whichMarge == _SC_MARGE_FOLDER)
|
||||||
width = 14;
|
width = 14;
|
||||||
execute(SCI_SETMARGINWIDTHN, whichMarge, willBeShowed?width:0);
|
execute(SCI_SETMARGINWIDTHN, whichMarge, willBeShowed?width:0);
|
||||||
|
|
|
@ -205,9 +205,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR cmdLineAnsi, int nCmdSh
|
||||||
if ((!isMultiInst) && (!TheFirstOne))
|
if ((!isMultiInst) && (!TheFirstOne))
|
||||||
{
|
{
|
||||||
HWND hNotepad_plus = ::FindWindow(Notepad_plus::getClassName(), NULL);
|
HWND hNotepad_plus = ::FindWindow(Notepad_plus::getClassName(), NULL);
|
||||||
for (;!(hNotepad_plus = ::FindWindow(Notepad_plus::getClassName(), NULL));)
|
for (int i = 0 ;!(hNotepad_plus = ::FindWindow(Notepad_plus::getClassName(), NULL)) && i < 5 ; i++)
|
||||||
Sleep(100);
|
Sleep(100);
|
||||||
|
|
||||||
|
if (hNotepad_plus)
|
||||||
|
{
|
||||||
// First of all, destroy static object NppParameters
|
// First of all, destroy static object NppParameters
|
||||||
pNppParameters->destroyInstance();
|
pNppParameters->destroyInstance();
|
||||||
MainFileManager->destroyInstance();
|
MainFileManager->destroyInstance();
|
||||||
|
@ -242,6 +244,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR cmdLineAnsi, int nCmdSh
|
||||||
::SendMessage(hNotepad_plus, WM_COPYDATA, (WPARAM)hInstance, (LPARAM)&fileNamesData);
|
::SendMessage(hNotepad_plus, WM_COPYDATA, (WPARAM)hInstance, (LPARAM)&fileNamesData);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pNppParameters->load();
|
pNppParameters->load();
|
||||||
|
|
Loading…
Reference in New Issue