D19446: DocumentPrivate: Support auto bracket in block selection mode

loh tar noreply at phabricator.kde.org
Wed Apr 3 15:51:16 BST 2019


loh.tar updated this revision to Diff 55346.
loh.tar edited the summary of this revision.
loh.tar edited the test plan for this revision.
loh.tar added a comment.


  - Ensure the new added brackets will not be part of the selection when selection was done from right->left
  - Enhance autotest
  
  There is already toVirtualColumn used by rangeOnLine() and I have no idea how to fix the remaining issues, maybe you. 
  F6749018: 1554301567.png <https://phabricator.kde.org/F6749018>
  In the pic was the selection always done from right->left which seems to be the problems to increase. Everything looks good (even it looks odd) except the highlighted case.
  The problem occurs when the selection start/end has mixed(different) space/tabs. The block below the highlighted is the same but works fine. So I think rangeOnLine() may need an improved.
  
    KTextEditor::Range KTextEditor::DocumentPrivate::rangeOnLine(KTextEditor::Range range, int line) const
    {
        const int col1 = toVirtualColumn(range.start());
        const int col2 = toVirtualColumn(range.end());
        return KTextEditor::Range(line, fromVirtualColumn(line, col1), line, fromVirtualColumn(line, col2));
    }

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19446?vs=55303&id=55346

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

AFFECTED FILES
  autotests/src/katedocument_test.cpp
  src/document/katedocument.cpp

To: loh.tar, #ktexteditor, cullmann
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/20190403/e305a550/attachment.html>


More information about the KWrite-Devel mailing list