Hi, This is actually not restricted to font locking as demonstrated by the test case. My initial report was a bit unclear about that. It also affects settings like: (setq compilation-scroll-output 'first-error) where the jump is done to the header instead of first error. My impression from reading the code is that we would want to avoid running (compilation--parse-region) on the header to avoid problems like this. I am attaching a patch that superficially seems to fix these issues. I have a hard time judging if this fix has any bad side effects or similar though. I am definitely missing a bit of context how the related functions are invoked. In testing of my own package I have seen what seems to be multiple rounds of font locking that erase previous rounds, probably coming from buffer changes in my downstream filter-function. In that setup, the jump to first error has been a more stable way of reproducing. /David