@@ -1654,6 +1654,8 @@ bool Text::edit(MuseScoreView*, Grip, int key, Qt::KeyboardModifiers modifiers,
1654
1654
CharFormat* charFmt = _cursor.format (); // take current format
1655
1655
_layout.insert (line + 1 , curLine ().split (_cursor.column ()));
1656
1656
_layout[line].setEol (true );
1657
+ if (_layout.last () != _layout[line+1 ])
1658
+ _layout[line+1 ].setEol (true );
1657
1659
1658
1660
_cursor.setLine (line+1 );
1659
1661
_cursor.setColumn (0 );
@@ -1876,6 +1878,8 @@ bool Text::deletePreviousChar()
1876
1878
for (const TextFragment& f : l1.fragments ())
1877
1879
l2.fragments ().append (f);
1878
1880
_layout.removeAt (_cursor.line ());
1881
+ if (_layout.last () == l2)
1882
+ l2.setEol (false );
1879
1883
_cursor.setLine (_cursor.line ()-1 );
1880
1884
}
1881
1885
else {
@@ -1899,6 +1903,8 @@ bool Text::deleteChar()
1899
1903
for (const TextFragment& f : l2.fragments ())
1900
1904
l1.fragments ().append (f);
1901
1905
_layout.removeAt (_cursor.line () + 1 );
1906
+ if (_layout.last () == l1)
1907
+ l1.setEol (false );
1902
1908
return true ;
1903
1909
}
1904
1910
return false ;
@@ -2117,13 +2123,14 @@ void Text::deleteSelectedText()
2117
2123
const TextBlock& l2 = _layout[r2];
2118
2124
for (const TextFragment& f : l2.fragments ())
2119
2125
l1.fragments ().append (f);
2120
-
2121
2126
_layout.removeAt (r2);
2122
2127
QMutableListIterator<TextBlock> i (_layout);
2123
2128
while (i.hasNext ()) {
2124
2129
if (toDelete.contains (i.next ()))
2125
2130
i.remove ();
2126
2131
}
2132
+ if (_layout.last () == l1)
2133
+ l1.setEol (false );
2127
2134
}
2128
2135
_cursor.setLine (r1);
2129
2136
_cursor.setColumn (c1);
0 commit comments