You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
auto insertNewBlock = [](LayoutData* ldata, TextCursor& cursor) {
1819
+
if (ldata->rows() <= cursor.row()) {
1820
+
ldata->blocks.push_back(TextBlock());
1821
+
}
1822
+
1823
+
if (cursor.row() < ldata->rows()) {
1824
+
if (ldata->blocks.at(cursor.row()).fragments().size() == 0) {
1825
+
ldata->blocks[cursor.row()].insertEmptyFragmentIfNeeded(&cursor); // used to preserve the Font size of the line (font info is held in TextFragments, see PR #5881)
1826
+
}
1827
+
1828
+
ldata->blocks[cursor.row()].setEol(true);
1829
+
}
1830
+
1831
+
cursor.setRow(cursor.row() + 1);
1832
+
cursor.setColumn(0);
1833
+
if (ldata->rows() <= cursor.row()) {
1834
+
ldata->blocks.push_back(TextBlock());
1835
+
}
1836
+
1837
+
if (cursor.row() < ldata->rows()) {
1838
+
if (ldata->blocks.at(cursor.row()).fragments().size() == 0) {
1839
+
ldata->blocks[cursor.row()].insertEmptyFragmentIfNeeded(&cursor); // an empty fragment may be needed on either side of the newline
if (ldata->blocks.at(cursor.row()).fragments().size() == 0) {
1838
-
ldata->blocks[cursor.row()].insertEmptyFragmentIfNeeded(&cursor); // used to preserve the Font size of the line (font info is held in TextFragments, see PR #5881)
1839
-
}
1840
-
1841
-
ldata->blocks[cursor.row()].setEol(true);
1842
-
}
1843
-
1844
-
cursor.setRow(cursor.row() + 1);
1845
-
cursor.setColumn(0);
1846
-
if (ldata->rows() <= cursor.row()) {
1847
-
ldata->blocks.push_back(TextBlock());
1848
-
}
1849
-
1850
-
if (cursor.row() < ldata->rows()) {
1851
-
if (ldata->blocks.at(cursor.row()).fragments().size() == 0) {
1852
-
ldata->blocks[cursor.row()].insertEmptyFragmentIfNeeded(&cursor); // an empty fragment may be needed on either side of the newline
0 commit comments