commit 4d02a54a02b508b6a98c3ef014c776d2ff86c343
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Sat Feb 21 19:16:45 2026 +0100
Compute boundary before metrics have been made obsolete
After inserting a character, it is too late to query TextMetrics for a
boundary. Compute it earlier.
---
src/Text.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/Text.cpp b/src/Text.cpp
index ef4c369c86..4bf82958f1 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -1135,6 +1135,7 @@ void Text::insertChar(Cursor & cur, char_type c)
}
pos_type pos = cur.pos();
+ bool boundary = cur.boundary() || tm.isRTLBoundary(cur.pit(), pos);
if (!cur.paragraph().isPassThru() && owner_->lyxCode() != IPA_CODE &&
cur.real_current_font.fontInfo().family() != TYPEWRITER_FAMILY &&
c == '-' && pos > 0) {
@@ -1158,9 +1159,6 @@ void Text::insertChar(Cursor & cur, char_type c)
cur.buffer()->params().track_changes);
cur.checkBufferStructure();
-// cur.screenUpdateFlags(Update::Force);
- bool boundary = cur.boundary()
- || tm.isRTLBoundary(cur.pit(), pos + 1);
setCursor(cur, cur.pit(), pos + 1, false, boundary);
charInserted(cur);
}
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs