Git commit efd67ba30629da14ca05ddf6438ef072b262fa50 by Pierre Stirnweiss. Committed on 06/01/2013 at 09:55. Pushed by pstirnweiss into branch 'master'. Fix wrong style applied on backspace When using backspace, we keep the char format of the deleted char. This should not apply when deleting across the newline boundary. M +4 -1 libs/kotext/commands/DeleteCommand.cpp http://commits.kde.org/calligra/efd67ba30629da14ca05ddf6438ef072b262fa50 diff --git a/libs/kotext/commands/DeleteCommand.cpp b/libs/kotext/commands/= DeleteCommand.cpp index 77bf535..5d39f4f7 100644 --- a/libs/kotext/commands/DeleteCommand.cpp +++ b/libs/kotext/commands/DeleteCommand.cpp @@ -138,6 +138,7 @@ void DeleteCommand::doDelete() Q_ASSERT(textEditor); QTextCursor *caret =3D textEditor->cursor(); QTextCharFormat charFormat =3D caret->charFormat(); + bool caretAtBeginOfBlock =3D (caret->position() =3D=3D caret->block().= position()); = if (!textEditor->hasSelection()) { if (m_mode =3D=3D PreviousChar) { @@ -176,7 +177,9 @@ void DeleteCommand::doDelete() = caret->deleteChar(); = - caret->setCharFormat(charFormat); + if (m_mode !=3D PreviousChar || !caretAtBeginOfBlock) { + caret->setCharFormat(charFormat); + } } = void DeleteCommand::deleteTextAnchor(KoInlineObject *object)