Bug 408016

Summary: Deletes previous line when hitting backspace at start of line
Product: [Frameworks and Libraries] frameworks-ktexteditor Reporter: Kai Uwe Broulik <kde>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: loh.tar
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Kai Uwe Broulik 2019-05-28 08:36:47 UTC
Since latest updates when I hit backspace in Kate at the beginning of a line, the entire line above it is deleted, affects Kate and Kwrite, so presumably a severe ktexteditor issue.

STEPS TO REPRODUCE
1. Write "Test" in a file and hit return so the cursor is now on a new line
2. Hit backspace

OBSERVED RESULT
The "Test" line is deleted

EXPECTED RESULT
The cursor moves to the end of the "Test" line


SOFTWARE/OS VERSIONS
KDE Applications Version: 19.07.70 (git)
KDE Frameworks Version: 5.59.0 (git)
Qt Version: 5.12.0

ADDITIONAL INFORMATION
No, I'm not in VI mode :)
Comment 1 Kai Uwe Broulik 2019-05-28 08:40:49 UTC
Git bisect suggests bcba8991413622ecec690a2c4ee033f47ef680a5 "Review del/backspace" as culprit
Comment 2 Lothar 2019-05-28 15:56:02 UTC
Git commit 7e739920fd230dc451e0bea25b96a9d92e708b68 by loh tar.
Committed on 28/05/2019 at 15:54.
Pushed by lohtar into branch 'master'.

Don't delete entire previous line by backspace in pos 0

Bug introduced by bcba8991413622ecec690a2c4ee033f47ef680a5
Sorry, for the hassle, I hope it's OK now.

Differential Revision: https://phabricator.kde.org/D19785

M  +3    -1    src/document/katedocument.cpp

https://commits.kde.org/ktexteditor/7e739920fd230dc451e0bea25b96a9d92e708b68
Comment 3 Dominik Haumann 2019-06-01 15:58:04 UTC
Btw, was this in a released KF5 version or just in master?

I am asking since if this is in a released gKF5 version, we should send a mail to kde-distro-packagers@kde.org to make packagers aware of this regression and fix.