Fix file status in "other view" is not detected

Fix #14225
This commit is contained in:
Don Ho 2023-12-27 18:40:12 +01:00
parent 5f13c84719
commit d7630fa42d
1 changed files with 10 additions and 7 deletions

View File

@ -4907,13 +4907,6 @@ bool Notepad_plus::activateBuffer(BufferID id, int whichOne, bool forceApplyHili
notifyBufferActivated(id, whichOne);
bool isCurrBuffDetection = (nppGui._fileAutoDetection & cdEnabledNew) ? true : false;
if (!reload && isCurrBuffDetection)
{
// Buffer has been activated, now check for file modification
// If enabled for current buffer
pBuf->checkFileState();
}
return true;
}
@ -6664,6 +6657,16 @@ void Notepad_plus::notifyBufferActivated(BufferID bufid, int view)
_pFuncList->reload();
}
NppGUI& nppGui = NppParameters::getInstance().getNppGUI();
bool isCurrBuffDetection = (nppGui._fileAutoDetection & cdEnabledNew) ? true : false;
bool reload = buf->getNeedReload();
if (!reload && isCurrBuffDetection)
{
// Buffer has been activated, now check for file modification
// If enabled for current buffer
buf->checkFileState();
}
_linkTriggered = true;
}