D17241: Disable highlighting for lines longer than 1024 characters.

Milian Wolff noreply at phabricator.kde.org
Tue Dec 4 09:33:04 GMT 2018


mwolff requested changes to this revision.
mwolff added a comment.
This revision now requires changes to proceed.


  what sven said, we should also remove the code to disable highlighting altogether when the line limit is reached, no?

INLINE COMMENTS

> katerenderer.cpp:387
>  
> +    if (textLine->length() > 1024 && !selectionsOnly) {
> +        return newHighlight;

put the 1024 into a constant and use it here and below such that we ensure the number stays in sync

also, don't we have a setting for the line length limit? shouldn't that be used instead here?

> katerenderer.cpp:400
> +            const QVector<Kate::TextLineData::Attribute> &al = textLine->attributesList();
> +            for (int i = 0; i < al.count(); ++i) {
> +                if (al[i].length > 0 && al[i].attributeValue > 0) {

this style-change should be submitted independently of this code review

REPOSITORY
  R39 KTextEditor

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

To: sars, cullmann, vkrause, dhaumann, mwolff
Cc: mwolff, brauch, kwrite-devel, kde-frameworks-devel, hase, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181204/624528f1/attachment.html>


More information about the Kde-frameworks-devel mailing list