Merge pull request #10230 from igorkorsukov/bugs/10134_text_edit_line_break

Fixed engraving text edit
This commit is contained in:
RomanPudashkin 2022-01-14 19:34:42 +02:00 committed by GitHub
commit 93eb2de54e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -616,10 +616,10 @@ void SplitJoinText::split(EditData* ed)
CharFormat* charFmt = _cursor.format(); // take current format
t->textBlockList().insert(line + 1, _cursor.curLine().split(_cursor.column(), t->cursorFromEditData(*ed)));
_cursor.curLine().setEol(eol);
_cursor.curLine().setEol(true);
_cursor.setRow(line + 1);
_cursor.curLine().setEol(true);
_cursor.curLine().setEol(eol);
_cursor.setColumn(0);
_cursor.setFormat(*charFmt); // restore orig. format at new line
_cursor.clearSelection();