loh.tar added a comment.

  That may fix it.
  
    diff --git a/src/document/katedocument.cpp b/src/document/katedocument.cpp
    index e365c380..7c24f67f 100644
    --- a/src/document/katedocument.cpp
    +++ b/src/document/katedocument.cpp
    @@ -3350,7 +3350,9 @@ void 
KTextEditor::DocumentPrivate::backspace(KTextEditor::ViewPrivate *view, con
     
         } else {
             // col == 0: wrap to previous line
    -        if (line > 0) {
    +        const Kate::TextLine textLine = m_buffer->plainLine(line - 1);
    +
    +        if (line > 0 && textLine) {
                 if (config()->wordWrap() && textLine->endsWith(QLatin1String(" 
"))) {
                     // gg: in hard wordwrap mode, backspace must also eat the 
trailing space
                     removeText(KTextEditor::Range(line - 1, textLine->length() 
- 1, line, 0));

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D19785

To: loh.tar, #ktexteditor, cullmann
Cc: safaalfulaij, kwrite-devel, kde-frameworks-devel, #ktexteditor, domson, 
michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann

Reply via email to