Fix file not dirty while its content changed on the hard drive.

Set buffer state to dirty when the file on the file system has changed but the user decided to not reload it in Notepad++.

Fixes #3246, closes #3499
pull/3499/merge
irgendsontyp 2017-07-07 17:52:34 +02:00 committed by Don HO
parent feff20893f
commit 7aef4a6b6d
1 changed files with 5 additions and 0 deletions

View File

@ -5018,8 +5018,13 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask)
// Then we ask user to update
if (doReloadOrNot(buffer->getFullPathName(), buffer->isDirty()) != IDYES)
{
// Since the file content has changed but the user doesn't want to reload it, set state to dirty
buffer->setDirty(true);
break; //abort
}
}
// Set _isLoadedDirty false so when the document clean state is reached the icon will be set to blue
buffer->setLoadedDirty(false);
doReload(buffer->getID(), false);