Re: Broken Code Highlighting in KDevelop

Milian Wolff <[email protected]>
Newsgroups gmane.comp.kde.devel.kwrite
Message-ID <41378004.3ql5f1phSK@milian-workstation>
On Mittwoch, 17. Februar 2021 09:40:01 CET David Redondo wrote:
> Hi,
> 
> recently files began to start losing their highlighting when editing in
> KDevelop. Symptoms are as follows:
>  - After inserting a new line anywhere in a document, everything below the
> new line will lose its highlighting
>  - When writing in the new line, the new code is highlighted correctly
>  - Removing the new line restores correct highlighting in the rest of the
> file
> 
> Yesterday after an older KDevelop showed the same behavior, I bisected
> fde333c87353e7c7424c7bce5cbc2f984bc868c1 in KTextEditor to have introduced
> this. Nothing there immediately appears to me to cause this.
> With the power of debug statements I confirmed that KDevelop reaches the
> "applyHighlighting" function
> (https://invent.kde.org/kdevelop/kdevelop/-/blob/
> master/kdevplatform/language/highlighting/codehighlighting.cpp#L519) and is
> not hitting any of the early returns. Then follows some range logic and I
> did see that the setAttribute calls at the end are also happening.
> 
> I'm not sure if the KTextEditor change surfaced a bug in KDevelop (somewhere
> in the range manipulation?) or if something in KTextEditor is not working
> correctly.

Hey David,

I believe I've also seen this yesterday, but it is not easy to reproduce, is 
it? If you find a way to reproduce, then let me know - I could look into that.

Cheers

-- 
Milian Wolff
[email protected]
http://milianw.de
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEezawi1aUvUGg3A1+8zYW/HGdOX8FAmAueaQACgkQ8zYW/HGd
OX+ALA/+JFt692Wru9I0uuJdpjyrqeXjpOvBYFrXLIN4qQ+lSSyoDstCJTPbMyqx
J15rM/wIogiEgZrmcyR4tJGyjfG8Xg//lPjM54kb6fJLteFympvWKUcz0r485Q64
yrU9spUdfLagAnp6aNZmhC/KvZio9gxmySJIhZ0sP/lH/GelaEyjtjzfFllp1Apg
SHFkWZ92KM+5G4S6WvfZV0B4is0EMiZq+1x/sGzZsOZxiSZ5sE9IMdGZPJMwIjhq
X8iDIQMnKm2b5wedb0ccgteYJgLH/coyXTyyt6nh3Y9cQgNUm3lLr2JpCWgQHQyT
McHhyj7hmIXpspCDNo4FDh/O/pOxOPFzD+anug1RQxF+Q45g6wGd5mfm4r+9Slmn
8iLPt4P8jjUmyIxv2ChVJUTuTaKULZmbF/myGWYFNZmNZyIOHKGPJ65M4KxXPDhx
VWQm+XYwizBv5igoRMkgHkFD55+SyK9E7jD1fFUuhyNgU9a3Fyo/D6wiQphfQaIb
iLNHVBEwznFRZ91uOnSxuv8qKUDWqIW6a8/bq4wxXj0l0vc9FNqTfpePHPY6a8Ni
QTXVoQFMGVkE5+WteicJBMJVz9+UBUfmQjPGvI/XgmEacDVpY4r5iHw09IRGf08I
j4qbSy5wI/eGvHIn0/q8SV20hraogHcbw5CaRWBfYIjfYBtVYRg=
=aUHt
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.