@Override
  public void onBatchModeStart(@NotNull Editor editor) {
    if (myDocument.isInBulkUpdate()) return;
    getPreferredSize(); // make sure size is calculated (in case it will be required while batch mode is active)
  }
@Override
  public void onBatchModeStart(@NotNull Editor editor)