D17241: WIP:Disable highlighting for lines longer than 1024 characters.

Dominik Haumann noreply at phabricator.kde.org
Sat Dec 8 16:39:53 GMT 2018


dhaumann added a comment.


  Is it correct that highlighting in the document (i.e. KSyntaxHighlighting) still takes place for the entire line, and this change simply only changes the fact that KateRenderer stops using the highlighting info after 100000 columns?
  
  Prior to accepting this patch, would it be possible to fix this differently, i.e. by profiling and fixing this properly instead of applying a workaround?

INLINE COMMENTS

> katetextbuffer.cpp:71
>      , m_newLineAtEof(false)
> -    , m_lineLengthLimit(4096)
> +    , m_lineLengthLimit(100000)
>      , m_alwaysUseKAuthForSave(alwaysUseKAuth)

Hm, isn't the line length limit configurable in kateconfig.cpp? There you will find a key called

  const char KEY_LINE_LENGTH_LIMIT[] = "Line Length Limit";

that is used to read/write the config file.

I think if this is changed here to 100000, it should be changed to the same value in KateDocumentConfig::readValue():

  setLineLengthLimit(config.readEntry(KEY_LINE_LENGTH_LIMIT, 4096));

And I would even suggest to rename as follows:

- const char KEY_LINE_LENGTH_LIMIT[] = "Line Length Limit"; + const char KEY_LINE_LENGTH_LIMIT[] = "Line Length Limitation";

Since then, all users will automatically get a reset here. Without this change, all users will stay on the 4096 limit.

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/kwrite-devel/attachments/20181208/997cb177/attachment.html>


More information about the KWrite-Devel mailing list