void (@NotNull Inlay<?> inlay) { if (myEditor.getDocument().isInBulkUpdate() || myEditor.getInlayModel().isInBatchMode()) return; Inlay.Placement placement = inlay.getPlacement(); if (placement == Inlay.Placement.INLINE) { int offset = inlay.getOffset(); for (CaretImpl caret : myCarets) { caret.onInlayAdded(offset); } } else if (placement != Inlay.Placement.AFTER_LINE_END || hasCaretInVirtualSpace()) { updateVisualPosition(); } }