Fix Reload dialog displaying issue during File Monitoring
Fix #5586, fix #4847, close #5591
This commit is contained in:
parent
a86870d8a0
commit
ad72f7c36c
@ -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())
|
||||
{
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user