D19446: DocumentPrivate: Support auto bracket in block selection mode
noreply at phabricator.kde.org
Fri Mar 1 17:23:41 GMT 2019
loh.tar created this revision.
loh.tar added a reviewer: KTextEditor.
Herald added projects: Kate, Frameworks.
Herald added subscribers: kde-frameworks-devel, kwrite-devel.
loh.tar requested review of this revision.
..how it should be by adding brackets to each line of the block
- Encapsulate in editBegin/End
- Reduce if/else nesting
Fixed in: 5.57
Oops?! I'm sorry the diff looks terrible. In the past were leading space changes ignored, so I had done these "Reduce if/else nesting" :-/
- Feature or bug? Select in block mode from right->left on a single line after last char a block. The brackets are exchanged )( and placed at the end of the block
- Code use MovingRange, old(?) similar code fumble around with backup cursors, I hope not for some optimizing but only because its older than MovingRange
- No use of toVirtualColumn or similar. It looks so far good anyway. Only when you mix tabs and spaces the result may sometimes odd. But I think there is no solution in using toVirtualColumn in the cases I had played around
- No call of view->slotTextInserted (will only emit signal) can't see any effect and isn't such signal not already emit by the doc itself?
- Autotests looks OK, I may add some for the new feature when patch gets accepted so far
To: loh.tar, #ktexteditor
Cc: kwrite-devel, kde-frameworks-devel, #ktexteditor, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KWrite-Devel