|
|
|
@ -4439,11 +4439,6 @@ void Notepad_plus::dropFiles(HDROP hdrop)
|
|
|
|
|
void Notepad_plus::checkModifiedDocument()
|
|
|
|
|
{
|
|
|
|
|
const int NB_VIEW = 2;
|
|
|
|
|
/*
|
|
|
|
|
ScintillaEditView * pScintillaArray[NB_VIEW];
|
|
|
|
|
DocTabView * pDocTabArray[NB_VIEW];
|
|
|
|
|
int currentIndex[NB_VIEW] = {-1, -1};
|
|
|
|
|
*/
|
|
|
|
|
struct ViewInfo {
|
|
|
|
|
int id;
|
|
|
|
|
ScintillaEditView * sv;
|
|
|
|
@ -4468,11 +4463,6 @@ void Notepad_plus::checkModifiedDocument()
|
|
|
|
|
viewInfoArray[1].currentIndex = viewInfoArray[1].sv->getCurrentDocIndex();
|
|
|
|
|
viewInfoArray[1].toBeActivated = false;
|
|
|
|
|
|
|
|
|
|
/*pScintillaArray[0] = _pEditView;
|
|
|
|
|
pScintillaArray[1] = getNonCurrentEditView();
|
|
|
|
|
pDocTabArray[0] = _pDocTab;
|
|
|
|
|
pDocTabArray[1] = getNonCurrentDocTab();*/
|
|
|
|
|
|
|
|
|
|
NppParameters *pNppParam = NppParameters::getInstance();
|
|
|
|
|
const NppGUI & nppGUI = pNppParam->getNppGUI();
|
|
|
|
|
bool autoUpdate = (nppGUI._fileAutoDetection == cdAutoUpdate) || (nppGUI._fileAutoDetection == cdAutoUpdateGo2end);
|
|
|
|
@ -4558,15 +4548,16 @@ void Notepad_plus::checkModifiedDocument()
|
|
|
|
|
|
|
|
|
|
if (autoUpdate)
|
|
|
|
|
{
|
|
|
|
|
int iCur = getCurrentView();
|
|
|
|
|
|
|
|
|
|
if (viewInfoArray[0].toBeActivated)
|
|
|
|
|
{
|
|
|
|
|
switchEditViewTo(viewInfoArray[0].id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (viewInfoArray[1].toBeActivated)
|
|
|
|
|
{
|
|
|
|
|
switchEditViewTo(viewInfoArray[1].id);
|
|
|
|
|
|
|
|
|
|
switchEditViewTo(iCur);
|
|
|
|
|
switchEditViewTo(viewInfoArray[0].id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -7581,6 +7572,7 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
|
|
|
|
return notify(reinterpret_cast<SCNotification *>(lParam));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
case NPPM_CHECKDOCSTATUS :
|
|
|
|
|
case WM_ACTIVATEAPP :
|
|
|
|
|
{
|
|
|
|
|
if (wParam == TRUE) // if npp is about to be activated
|
|
|
|
|