diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 271f2f5ae..1c2116de6 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -5129,6 +5129,10 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask) } case DOC_MODIFIED: //ask for reloading { + // Since it is being monitored DOC_NEEDRELOAD is going to handle the change. + if (buffer->isMonitoringOn()) + break; + bool autoUpdate = (nppGUI._fileAutoDetection & cdAutoUpdate) ? true : false; if (!autoUpdate || buffer->isDirty()) { diff --git a/PowerEditor/src/ScitillaComponent/Buffer.cpp b/PowerEditor/src/ScitillaComponent/Buffer.cpp index 8e49eb229..897fdb1aa 100644 --- a/PowerEditor/src/ScitillaComponent/Buffer.cpp +++ b/PowerEditor/src/ScitillaComponent/Buffer.cpp @@ -224,7 +224,10 @@ void Buffer::setFileName(const TCHAR *fn, LangType defaultLang) bool Buffer::checkFileState() // returns true if the status has been changed (it can change into DOC_REGULAR too). false otherwise { - if (_currentStatus == DOC_UNNAMED) //unsaved document cannot change by environment + // 1. Unsaved document cannot change by environment + // 2. Monitoring is sent by NPPM_INTERNAL_RELOADSCROLLTOEND + // So no need to check file status for both the above cases + if (_currentStatus == DOC_UNNAMED || isMonitoringOn()) return false; WIN32_FILE_ATTRIBUTE_DATA attributes;