@Override
        public void beforeDocumentChange(@NotNull DocumentEvent event) {
          linesBefore = event.getDocument().getLineCount();
        }
@Override
        public void beforeDocumentChange(@NotNull DocumentEvent event)