void clearLineModificationFlagsExcept(int @NotNull [] caretLines) {
    IntList modifiedLines = new IntArrayList(caretLines.length);
    LineSet lineSet = getLineSet();
    for (int line : caretLines) {
      if (line >= 0 && line < lineSet.getLineCount() && lineSet.isModified(line)) {
        modifiedLines.add(line);
      }
    }
    lineSet = lineSet.clearModificationFlags();
    lineSet = lineSet.setModified(modifiedLines);
    myLineSet = lineSet;
    myFrozen = null;
  }
void clearLineModificationFlagsExcept(int @NotNull [] caretLines)