Bug 458500

Summary: With multiple cursors and selections active, Delete key deletes one extra character on all but one selection
Product: [Applications] kate Reporter: nyanpasu64 <nyanpasu64>
Component: partAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: waqar.17a
Priority: NOR    
Version First Reported In: 22.08.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description nyanpasu64 2022-08-30 09:18:53 UTC
SUMMARY
If I create multiple cursors in Kate, then Shift+Right to create multiple selections, and press Delete, all but the one cursor's selection deletes one extra character after the selection.

STEPS TO REPRODUCE
1. Open Kate and type multiple lines of text (eg. asdf on each line).
2. Press Ctrl+Home to move the cursor to the first line's beginning, then Ctrl+Alt+Down to create multiple cursors at the beginning of each line.
2a. Alternatively press Ctrl+Alt+Up to create multiple cursors upwards.
3. Press Shift+Right to select 1 or more characters per line.
3a. Alternatively, if your cursors were created not at the leftmost column, press Shift+Left.
4. Press the Delete key.

OBSERVED RESULT
If you pressed Ctrl+Alt+Down, all but the second line will delete the selected text plus one subsequent character to the right. If you pressed Ctrl+Alt+Up, all but the first line will delete the selected text plus one subsequent character to the right.

EXPECTED RESULT
Only selected text is deleted when pressing Delete, just like Backspace.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Kernel Version: 5.19.4-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 570 Series
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B550M DS3H

ADDITIONAL INFORMATION
Comment 1 Waqar Ahmed 2022-08-30 09:55:34 UTC
Fixed in master