https://bugs.kde.org/show_bug.cgi?id=453762
Bug ID: 453762 Summary: Long lines break C code highlighting Product: kate Version: 22.04.0 Platform: openSUSE RPMs OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: part Assignee: kwrite-bugs-n...@kde.org Reporter: f.alexander.wi...@gmail.com Target Milestone: --- Created attachment 148809 --> https://bugs.kde.org/attachment.cgi?id=148809&action=edit Initial Code SUMMARY The code highlighting stops working when a file contains lines longer than 5360 characters STEPS TO REPRODUCE 1. Open minimal_example.c in Kate 2. Observe the broken code highlighting or 1. Go to https://picheta.me/obfuscator, select "Generic FizzBuzz" and click "Obfuscate" 2. Copy obfuscated code, paste it into the editor on the left and click "Obfuscate" 3. Copy obfuscated code, paste it into the editor on the left and click "Obfuscate" once more 4. Copy obfuscated code, paste it into Kate and save it as a C file 5. Observe the broken code highlighting OBSERVED RESULT In the first few lines after a newline, the hexadecimal integers are highlighted in yellow, afterwards they are no longer highlighted. EXPECTED RESULT The highlighting should be consistent. After saving and opening the file, the following warning message is shown: "The file generic_fizzbuzz_obfuscated_thrice.c was opened and contained line slonger than the configured Line Length Limit (10,000 characters). The longest of those lines was 10,313 characters long" Clicking on "Temporarily raise limit and reload file" does not fix the highlighting. However, adding a newline somewhere in the sum of hex values results in the highlighting being applied properly after the newline. I know this is a niche case, but maybe the bug report is helpful anyway. SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20220427 KDE Plasma Version: 5.24.4 KDE Frameworks Version: 5.93.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION -- You are receiving this mail because: You are watching all bug changes.