Bug 453354

Summary: Multi-line edits in block selection mode spawn additional brackets, all brackets are auto selected
Product: [Applications] kdevelop Reporter: Daniel <md5003>
Component: All editorsAssignee: kdevelop-bugs-null
Status: CONFIRMED ---    
Severity: minor CC: aaron.c.hammond
Priority: NOR    
Version First Reported In: 5.7.211203   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Daniel 2022-05-03 18:15:44 UTC
SUMMARY
When editing multiple lines in block selection mode everything works as expected, until you type brackets (closing or opening). An additional undesired bracket is added, all the brackets (the one you typed as well as the additional one) are selected and thus overwritten on the next button press. True for all () {} []



STEPS TO REPRODUCE
1.  Turn on block select mode
2.  Select multiple lines
3.  Type your text including a bracket (opening or closing)

OBSERVED RESULT
Typed ")" got ")(" (text selected)

EXPECTED RESULT
Type ")" get ")" (text not selected)

SOFTWARE/OS VERSIONS
Currently tested on 5.7.211203 on Manjaro Linux

ADDITIONAL INFORMATION
Comment 1 aaron.c.hammond 2024-01-15 03:24:20 UTC
Confirmed in Version 5.10.221202 (22.12.2), Kate Version 22.12.3

I have automatic bracket closure turned off, but still automatically closes brackets while in block select mode.
I believe it is due to the `when you type these characters while text is selected, they will surround the selected text instead of replacing it` option in the editing options.
Selecting a vertical column of lines with width 0 (I intend to insert text across many lines) probably fires the 'selected' criteria, despite no characters being selected.

Would prefer for kate/kdevelop to ~never~ add automatic brackets, or at least let me configure it.