Bug 448692

Summary: Pressing Ctrl+Backspace (Delete Word Left) after single-letter word deletes two words
Product: [Frameworks and Libraries] frameworks-ktexteditor Reporter: nyanpasu64 <nyanpasu64>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: waqar.17a
Priority: NOR    
Version First Reported In: 5.90.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description nyanpasu64 2022-01-18 07:19:26 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Open KWrite and type asdf a. Alternatively you can type any number of words, followed by 1 or more spaces, then a single letter, then EOF or a newline.
2. Place the cursor at the end of the line and press Ctrl+Backspace.

OBSERVED RESULT
The single-letter word and the preceding word are deleted.

EXPECTED RESULT
Only the single-letter word is deleted.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.23.90
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.0-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GT 730/PCIe/SSE2

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2022-01-18 10:01:09 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/258
Comment 2 Christoph Cullmann 2022-01-20 14:35:17 UTC
Git commit ec9ac1b068a8dcdb812a132f21b5a657863b4109 by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 20/01/2022 at 14:25.
Pushed by cullmann into branch 'master'.

Fix camel cursor when last word is of one letter only

M  +2    -0    autotests/src/camelcursortest.cpp
M  +15   -0    src/view/kateviewinternal.cpp

https://invent.kde.org/frameworks/ktexteditor/commit/ec9ac1b068a8dcdb812a132f21b5a657863b4109