Ok, I may have found something, but I need to get our carbon expert on it.
It seems, that when a tiny bit (1 or 2 lines need repaint) the cliprect (which specifies the area) does not work.
So the editor paints all.
The caret triggers a paint of the area, where it was, each time it gets hidden. That are a few pixel, but due to the issue, it is a full repaint.
However, that does not link to the code size (unit of 30, or 700 lines).