D19446: DocumentPrivate: Support auto bracket in block selection mode
Christoph Cullmann
noreply at phabricator.kde.org
Sun Mar 31 11:09:32 BST 2019
cullmann added a comment.
Hi,
I think this is an improvement.
Could you update the patch to current master?
For your questions:
- 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
Hmm, I think this counts as a bug.
- Code use MovingRange, old(?) similar code fumble around with backup cursors, I hope not for some optimizing but only because its older than MovingRange
I think this was just ancient code.
I think for this action, there is no need to try to micro-optimized, the movingrange solution is more safe.
- 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
I would have thought that toVirtualColumn solves the issues if you have mixed tabs/spaces. Thought I am not that concerned if that is not perfect, given block selection + mixing tabs/spaces is always a mess.
- 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?
Calls to that should be added. People might rely in the apps using the part that we emit that for "user-inserted" text, as the docs state.
Should be no big issue, or? Just call that after each insertText operation, like before.
- Autotests looks OK, I may add some for the new feature when patch gets accepted so far
That would be great!
You can count this as accepted after the above pointed out things are altered.
REPOSITORY
R39 KTextEditor
REVISION DETAIL
https://phabricator.kde.org/D19446
To: loh.tar, #ktexteditor
Cc: cullmann, kwrite-devel, kde-frameworks-devel, #ktexteditor, gennad, domson, michaelh, ngraham, bruns, demsking, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190331/54cd2a4e/attachment.html>
More information about the KWrite-Devel
mailing list