Bug 382213 - do not do auto-brackets when block mode is enabled
Summary: do not do auto-brackets when block mode is enabled
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: kwrite (show other bugs)
Version: 17.04.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-10 19:00 UTC by Mathieu Jobin
Modified: 2019-04-07 14:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.58


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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