D19446: DocumentPrivate: Support auto bracket in block selection mode

loh tar 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.

REVISION SUMMARY
  ..how it should be by adding brackets to each line of the block
  
  - Encapsulate in editBegin/End
  - Reduce if/else nesting
  
  BUG:382213
  Fixed in: 5.57

TEST PLAN
  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

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D19446

AFFECTED FILES
  src/document/katedocument.cpp

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...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190301/d3aeffaf/attachment-0001.html>


More information about the KWrite-Devel mailing list