@Override
    public @NotNull AttributedCharacterIterator getCommittedText(int beginIndex,
                                                                 int endIndex,
                                                                 AttributedCharacterIterator.Attribute[] attributes) {
      int composedStartIndex = 0;
      int composedEndIndex = 0;
      if (composedRangeMarker != null) {
        composedStartIndex = composedRangeMarker.getStartOffset();
        composedEndIndex = composedRangeMarker.getEndOffset();
      }

      String committed;
      if (beginIndex < composedStartIndex) {
        if (endIndex <= composedStartIndex) {
          committed = getText(beginIndex, endIndex);
        }
        else {
          int firstPartLength = composedStartIndex - beginIndex;
          committed = getText(beginIndex, beginIndex + firstPartLength) + getText(composedEndIndex, endIndex - firstPartLength);
        }
      }
      else {
        committed = getText(beginIndex + composedEndIndex - composedStartIndex, endIndex);
      }

      return new AttributedString(committed).getIterator();
    }
@Override
    public @NotNull AttributedCharacterIterator getCommittedText(int beginIndex,
                                                                 int endIndex,
                                                                 AttributedCharacterIterator.Attribute[] attributes)