void doWithCaretMerging(@NotNull Runnable runnable) {
    EditorImpl.assertIsDispatchThread();
    if (myPerformCaretMergingAfterCurrentOperation) {
      runnable.run();
    }
    else {
      myPerformCaretMergingAfterCurrentOperation = true;
      try {
        runnable.run();
        mergeOverlappingCaretsAndSelections();
      }
      finally {
        myPerformCaretMergingAfterCurrentOperation = false;
      }
    }
  }
void doWithCaretMerging(@NotNull Runnable runnable)