@Override
    public void beforeDocumentChange(@NotNull DocumentEvent e) {
      Document doc = e.getDocument();
      VirtualFile file = FileDocumentManager.getInstance().getFile(doc);
      if (file != null) {
        for (Bookmark bookmark : myBookmarks.get(file)) {
          if (bookmark.getLine() == -1) continue;
          List<BookmarkInfo> list = myBeforeChangeData.computeIfAbsent(doc, __ -> new ArrayList<>());
          list.add(new BookmarkInfo(bookmark,
                                    bookmark.getLine(),
                                    doc.getText(new TextRange(doc.getLineStartOffset(bookmark.getLine()),
                                                              doc.getLineEndOffset(bookmark.getLine())))));
        }
      }
    }
@Override
    public void beforeDocumentChange(@NotNull DocumentEvent e)