[LyX/master] Fix problem with c67b6be77 noted by JMarc.

Richard Kimberly Heck rikiheck at lyx.org
Sun Apr 26 19:49:57 UTC 2020


commit 1344caa67ae8a5302275691c0e07bb5af664b3fc
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date:   Sun Apr 26 16:10:50 2020 -0400

    Fix problem with c67b6be77 noted by JMarc.
---
 src/Text.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/Text.cpp b/src/Text.cpp
index ac6dda5..7c00a6a 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -1800,6 +1800,7 @@ bool Text::dissolveInset(Cursor & cur)
 	// save position inside inset
 	pos_type spos = cur.pos();
 	pit_type spit = cur.pit();
+	bool const inset_non_empty = cur.lastpit() != 0 || cur.lastpos() != 0;
 	cur.popBackward();
 	// update cursor offset
 	if (spit == 0)
@@ -1813,7 +1814,7 @@ bool Text::dissolveInset(Cursor & cur)
 
 	Buffer & b = *cur.buffer();
 	// Is there anything in this text?
-	if (cur.lastpit() != 0 || cur.lastpos() != 0) {
+	if (inset_non_empty) {
 		// see bug 7319
 		// we clear the cache so that we won't get conflicts with labels
 		// that get pasted into the buffer. we should update this before


More information about the lyx-cvs mailing list