void (CaretEvent e) { if (myPrimaryCaret != null) { myPrimaryCaret.updateVisualPosition(); // repainting old primary caret's row background } repaintCaretRegion(e); myPrimaryCaret = myCaretModel.getPrimaryCaret(); }