[LyX/2.4.x] Force a metrics update of buffer after reload

Jean-Marc Lasgouttes lasgouttes at lyx.org
Tue Aug 27 12:07:59 UTC 2024


commit f06de64047f5b9d3e3033ed208c832c263779497
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Tue Aug 27 00:09:04 2024 +0200

    Force a metrics update of buffer after reload
    
    It makes reload more robust and is in any case good enough to avoid
    crash in #139091.
    
    Fixes bug #13091.
    
    (cherry picked from commit 52ec69a1af7f8c860d6f1d6ed6337db58d5ce163)
---
 src/Buffer.cpp | 1 +
 status.24x     | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 1dc29d9568..ef7367ca23 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -5585,6 +5585,7 @@ Buffer::ReadStatus Buffer::reload()
 	removePreviews();
 	updatePreviews();
 	errors("Parse");
+	changed(true);
 	return status;
 }
 
diff --git a/status.24x b/status.24x
index a5db20964d..9d1b1a3f5e 100644
--- a/status.24x
+++ b/status.24x
@@ -52,6 +52,8 @@ What's new
   modification. Only file deletion will trigger the modification
   flag now (see bug 12819).
 
+- fix crash when using Save As... with previews enabled (bug 13091).
+
 
 * DOCUMENTATION AND LOCALIZATION
 


More information about the lyx-cvs mailing list