GRAPHICS: MACGUI: inherit paragraphEnd when we adding new line in mactext

This commit is contained in:
ysj1173886760 2021-06-06 09:23:21 +08:00 committed by Eugene Sandulenko
parent 12232c992a
commit 51698610d2

View File

@ -1933,6 +1933,9 @@ void MacText::addNewLine(int *row, int *col) {
MacFontRun newchunk = line->chunks[ch];
MacTextLine newline;
// we have to inherit paragraphEnd from the origin line
newline.paragraphEnd = line->paragraphEnd;
newchunk.text = line->chunks[ch].text.substr(pos);
line->chunks[ch].text = line->chunks[ch].text.substr(0, pos);
line->paragraphEnd = true;