mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 05:45:00 +02:00
Fixed crash due to "File status auto-detection" enhancement
Close #5438
This commit is contained in:
parent
28f87ca6de
commit
f7645fe27e
@ -3783,20 +3783,20 @@ bool Notepad_plus::activateBuffer(BufferID id, int whichOne)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isCurrBuffDetection = (NppParameters::getInstance()->getNppGUI()._fileAutoDetection & cdEnabledNew) ? true : false;
|
|
||||||
|
|
||||||
if (reload)
|
if (reload)
|
||||||
{
|
{
|
||||||
performPostReload(whichOne);
|
performPostReload(whichOne);
|
||||||
}
|
}
|
||||||
else if(isCurrBuffDetection)
|
|
||||||
|
notifyBufferActivated(id, whichOne);
|
||||||
|
|
||||||
|
bool isCurrBuffDetection = (NppParameters::getInstance()->getNppGUI()._fileAutoDetection & cdEnabledNew) ? true : false;
|
||||||
|
if (!reload && isCurrBuffDetection)
|
||||||
{
|
{
|
||||||
// Buffer has been activated, now check for file modification
|
// Buffer has been activated, now check for file modification
|
||||||
// If enabled for current buffer
|
// If enabled for current buffer
|
||||||
pBuf->checkFileState();
|
pBuf->checkFileState();
|
||||||
}
|
}
|
||||||
|
|
||||||
notifyBufferActivated(id, whichOne);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user