IDEA-80056 caret painting fix