Hi JMarc, this change breaks the cursor movement (at least on Mac). Do have no problems on your side?
The cursor cannot positioned inside a paragraph with multiple lines. It hangs at the top in the first line⦠BR Stephan > Am 29.04.2025 um 13:33 schrieb Jean-Marc Lasgouttes <[email protected]>: > > commit 2637d81f313d1c94aafdbd8c687d3034e89f70df > Author: Jean-Marc Lasgouttes <[email protected]> > Date: Tue Apr 29 13:29:54 2025 +0200 > > Avoid code duplication related to PREEDIT > --- > src/Row.cpp | 36 ++++++++++++------------------------ > 1 file changed, 12 insertions(+), 24 deletions(-) > > diff --git a/src/Row.cpp b/src/Row.cpp > index a6cc00b6ef..1dcccf7f33 100644 > --- a/src/Row.cpp > +++ b/src/Row.cpp > @@ -167,37 +167,25 @@ bool Row::Element::splitAt(int const width, int > next_width, SplitType split_type > bool first = true; > docstring::size_type i = 0; > for (FontMetrics::Break const & brk : breaks) { > + Element e(type, pos, font, change); > + e.str = str.substr(i, brk.len); > + e.dim.wid = brk.wid; > + e.nspc_wid = brk.nspc_wid; > + e.row_flags = CanBreakInside | BreakAfter; > if (type == PREEDIT) { > - Element e(type, pos, font, change); > - e.str = str.substr(i, brk.len); > e.endpos = e.pos; > - e.dim.wid = brk.wid; > - e.nspc_wid = brk.nspc_wid; > - e.row_flags = CanBreakInside | BreakAfter; > e.im = im; > e.char_format_index = char_format_index; > - if (first) { > - // this element eventually goes to *this > - e.row_flags |= row_flags & ~AfterFlags; > - first_e = e; > - first = false; > - } else > - tail.push_back(e); > } else { > - Element e(type, pos + i, font, change); > - e.str = str.substr(i, brk.len); > e.endpos = e.pos + brk.len; > - e.dim.wid = brk.wid; > - e.nspc_wid = brk.nspc_wid; > - e.row_flags = CanBreakInside | BreakAfter; > - if (first) { > - // this element eventually goes to *this > - e.row_flags |= row_flags & ~AfterFlags; > - first_e = e; > - first = false; > - } else > - tail.push_back(e); > } > + if (first) { > + // this element eventually goes to *this > + e.row_flags |= row_flags & ~AfterFlags; > + first_e = e; > + first = false; > + } else > + tail.push_back(e); > i += brk.len; > } > > -- > lyx-cvs mailing list > [email protected] > https://lists.lyx.org/mailman/listinfo/lyx-cvs -- lyx-devel mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-devel
