@Override
      public void documentChangedNonBulk(@NotNull DocumentEvent event) {
        DocumentEx document = getDocument();
        if (document.getTextLength() > 0) {
          addLineSeparatorPainterIfNeeded();
          int startDocLine = document.getLineNumber(event.getOffset());
          int endDocLine = document.getLineNumber(event.getOffset() + event.getNewLength());
          if (event.getOldLength() > event.getNewLength() || startDocLine != endDocLine || StringUtil.indexOf(event.getOldFragment(), '\n') != -1) {
            updateGutterSize(startDocLine, endDocLine);
          }
        }
        else if (event.getOldLength() > 0) {
          documentCleared();
        }
      }
@Override
      public void documentChangedNonBulk(@NotNull DocumentEvent event)