Bug 382213

Summary: do not do auto-brackets when block mode is enabled
Product: [Applications] kate Reporter: Mathieu Jobin <opensource>
Component: kwriteAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 17.04.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.58
Sentry Crash Report:

Description Mathieu Jobin 2017-07-10 19:00:47 UTC
when using block mode also known as column edit, and having auto-bracket enabled. when typing ( or " , etc. it will surround the selection.

not the expected behavior.

I love both features, but they should be mutually exclusive

thank you very much

best editor ever
Comment 1 Lothar 2019-04-07 14:00:58 UTC
Git commit ad4cd4a7250801573a68b00e7767cbf374d049f0 by loh tar.
Committed on 07/04/2019 at 13:59.
Pushed by lohtar into branch 'master'.

DocumentPrivate: Support auto bracket in block selection mode

..how it should be by adding brackets to each line of the block

- Ensure the new added brackets will never be part of the selection
- Encapsulate in editBegin/End
- Reduce if/else nesting which make this patch looking bad, sorry

There are still some issues with a mix of space/tabs and when apply
on line on a single line behind the end of line, see phab link.
FIXED-IN: 5.58

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

M  +31   -0    autotests/src/katedocument_test.cpp
M  +128  -115  src/document/katedocument.cpp

https://commits.kde.org/ktexteditor/ad4cd4a7250801573a68b00e7767cbf374d049f0