Bug 518791 - Keyboard text selection from beginning of line is buggy, sometimes deletes text
Summary: Keyboard text selection from beginning of line is buggy, sometimes deletes text
Status: RESOLVED DUPLICATE of bug 516511
Alias: None
Product: kate
Classification: Applications
Component: kwrite (other bugs)
Version First Reported In: 25.12.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-04-10 21:01 UTC by robert.houkula
Modified: 2026-04-13 06:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description robert.houkula 2026-04-10 21:01:35 UTC
SUMMARY

Using the keyboard (shift+arrow keys) to select text from the beginning of the line makes the cursor jump somewhere else instead of selecting text, sometimes deletes text and breaks undo history (could not reproduce the latter)

STEPS TO REPRODUCE
1. Open kwrite
2. Type "hello"
3. Go to beginning of text (mouse or keyboard)
4. Press the shift key down
5. While still holding down shift, press the right arrow key once

OBSERVED RESULT
Cursor goes to the end of the word, no text is selected

EXPECTED RESULT
The letter "h" is selected, cursor is between "h" and "e".

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 43 (KDE Plasma desktop edition) x86_64
KDE Plasma Version: 6.6.3
KDE Frameworks Version: 6.24.0
Qt Version: 6.10.3

ADDITIONAL INFORMATION
I have once or twice observed this behaviour in other software that may use a shared text editing component, but kwrite is where I encounter this bug most often.
Additionally, I have been experiencing this bug for a while, it just took me a long time to make it reproducible.
I could not reproduce the text deletion behaviour, but it usually happens in similar circumstances, but after pasting a bigger amount of text.
Comment 1 robert.houkula 2026-04-12 11:10:51 UTC
Reproducing the text deletion issue:

1. Open kwrite
2. Type ".hi"
3. Go to beginning of text (mouse or keyboard)
4. Press the shift key down
5. While still holding down shift, press the right arrow key twice

OBSERVED RESULT
After the first press, everything still works. After the second press, the period disappears. Undoing repeatedly results in a broken loop where the period is unrecoverable.
Comment 2 Waqar Ahmed 2026-04-13 06:35:37 UTC

*** This bug has been marked as a duplicate of bug 516511 ***