From 7aef4a6b6df10923c3ea44ee135f32d0f25cee26 Mon Sep 17 00:00:00 2001 From: irgendsontyp Date: Fri, 7 Jul 2017 17:52:34 +0200 Subject: [PATCH] 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 --- PowerEditor/src/Notepad_plus.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index f12032f7c..9931e9d89 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -5018,7 +5018,12 @@ 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);