diff --git a/autotests/src/katedocument_test.cpp b/autotests/src/katedocument_test.cpp --- a/autotests/src/katedocument_test.cpp +++ b/autotests/src/katedocument_test.cpp @@ -449,7 +449,7 @@ { KTextEditor::DocumentPrivate doc; auto view = static_cast(doc.createView(nullptr)); - view.config()->setBackspaceRemoveComposed(true); + view->config()->setBackspaceRemoveComposed(true); doc.setText(QString::fromUtf8("व्यक्तियों")); doc.del(view, Cursor(0, 0)); diff --git a/src/document/katedocument.cpp b/src/document/katedocument.cpp --- a/src/document/katedocument.cpp +++ b/src/document/katedocument.cpp @@ -3167,6 +3167,7 @@ } if (col > 0) { + bool useNextBlock = false; if (config()->backspaceIndents()) { // backspace indents: erase to next indent position Kate::TextLine textLine = m_buffer->plainLine(line); @@ -3186,8 +3187,11 @@ // only spaces on left side of cursor indent(KTextEditor::Range(line, 0, line, 0), -1); } + else { + useNextBlock = true; + } } - if (!config()->backspaceIndents() || pos) { + if (!config()->backspaceIndents() || useNextBlock) { KTextEditor::Cursor beginCursor(line, 0); KTextEditor::Cursor endCursor(line, col); if (!view->config()->backspaceRemoveComposed()) { // Normal backspace behavior