On Mon, Aug 19, 2024 at 11:15:50AM -0400, Richard Kimberly Heck wrote:
> On 8/19/24 9:38 AM, Pavel Sanda wrote:
> > On Mon, Aug 19, 2024 at 11:21:37AM +0200, Jean-Marc Lasgouttes wrote:
> > > I do not remember such a deliberate changel, but I may have missed it (or 
> > > we'll find out that I did it on purpose and forgot about it ????).
> > It looks as unintended change of 5b2b0d5c76cf2. Riki?
> 
> Not intended. Fine with me to go back to the old behavior.

Ok, attached is my proposal. I flag the document only in the case
of file deletion, not just the external change.
Seems to work with in my testing.

If you are OK with it, I'll commit to master and branch.

Pavel
diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 35b45202d1..cdbfe5f0e2 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -5667,7 +5667,6 @@ void Buffer::Impl::fileExternallyModified(bool const exists)
 		       "checksum unchanged: " << filename);
 		return;
 	}
-	lyx_clean = false;
 	// If the file has been deleted, only mark the file as dirty since it is
 	// pointless to prompt for reloading. If later a file is moved into this
 	// location, then the externally modified warning will appear then.
@@ -5678,6 +5677,7 @@ void Buffer::Impl::fileExternallyModified(bool const exists)
 	if (wa_ && wa_->unhide(owner_)) {
 		wa_->updateTitles();
 		if (!exists) {
+			lyx_clean = false;
 			frontend::Alert::warning(
 				_("File deleted from disk"),
 				bformat(_("The file\n  %1$s\n"
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to