[LyX/master] When row if empty, set endpos correctly.

Jean-Marc Lasgouttes lasgouttes at lyx.org
Tue Dec 28 17:21:10 UTC 2021


commit dbd33f6622a4a62c102c640b80c36dc40a67b846
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Tue Dec 28 18:48:55 2021 +0100

    When row if empty, set endpos correctly.
---
 src/TextMetrics.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index 2b1ee5a..2cf3ce9 100644
--- a/src/TextMetrics.cpp
+++ b/src/TextMetrics.cpp
@@ -1063,7 +1063,7 @@ Row newRow(TextMetrics const & tm, pit_type pit, pos_type pos, bool is_rtl)
 void cleanupRow(Row & row, bool at_end)
 {
 	if (row.empty()) {
-		row.endpos(0);
+		row.endpos(row.pos());
 		return;
 	}
 


More information about the lyx-cvs mailing list