Strange bug in code highlighting
mwoehlke.floss at gmail.com
Wed Feb 28 20:09:28 GMT 2018
On 2018-02-27 11:12, Sven Brauch wrote:
> Yes, it's known. It is extremely difficult to trace though. [...]
> Any insights on how to reproduce the issue are very welcome.
Hmm... here's an interesting data point. I had TTBOMK no active parsing
(KDevelop sitting idle for a while). Then I switched to a different git
branch (outside of KDevelop), followed immediately by doing a pull (so,
possibly, KDevelop started parsing the pre-pull files). I then opened a
file that I did not previously have open, and am seeing this issue.
Thus, at the least, I can say with some confidence that the problem
doesn't seem to depend on editing a file *in KDevelop*. There may be an
issue with a file being changed on disk, outside of KDevelop, while it
is being parsed.
A rough guess what may be happening:
- File changes on disk ("rev A").
- KDevelop starts to re-parse file.
- File changes on disk again ("rev B").
- KDevelop finishes parsing "rev A".
- User opens file in KDevelop.
- KDevelop highlights per "rev A", but file content is "rev B".
...although I was unsuccessful at trying to reproduce that intentionally.
More information about the KDevelop