void (@NotNull Graphics g) { // There is a possible case that visual caret position is changed because of newly added or removed soft wraps. // We check if that's the case and ask caret model to recalculate visual position if necessary. myCaretCursor.paint(g); }