[LyX/2.5.x] Attempt on #9395 - Compare (diff) misses changes in nested insets

Pavel Sanda <[email protected]>
Newsgroups gmane.editors.lyx.cvs
Message-ID <[email protected]>
commit 9b535fa096b0ca5834e514143264deb4eb758ead
Author: Pavel Sanda <[email protected]>
Date:   Tue Aug 18 02:22:06 2026 +0200

    Attempt on #9395 - Compare (diff) misses changes in nested insets
    
    Backport 88f4caa2.
    Assisted-by: Claude Opus 4.7
---
 src/Compare.cpp | 6 +++---
 status.25x      | 3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/Compare.cpp b/src/Compare.cpp
index 09ae6b5ef4..c7bc679046 100644
--- a/src/Compare.cpp
+++ b/src/Compare.cpp
@@ -761,9 +761,9 @@ void Compare::Impl::diff_i(DocRangePair const & rp)
 	// the strings were completely different, or we found a middle
 	// snake and we can split the string into two parts to process.
 	if (L_ses == 0)
-		// Two the same strings (this must be a very rare case, because
-		// usually this will be part of a snake adjacent to these strings).
-		writeToDestBuffer(rp.o);
+		// Two the same strings at this level, but nested insets may still
+		// differ - processSnake recurses into them via diffInset().
+		processSnake(rp);
 
 	else if (middle_snake.o.empty()) {
 		// Two totally different strings
diff --git a/status.25x b/status.25x
index 006e04c43a..16d432e76d 100644
--- a/status.25x
+++ b/status.25x
@@ -18,6 +18,9 @@ What's new
 
 * MISCELLANEOUS
 
+- Fix longstanding bug in comparison feature, which missed changes in
+  nested insets (bug #9395).
+
 
 * TEX2LYX IMPROVEMENTS
 
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.