public static void doNotScrollToCaret(@NotNull JTextComponent textComponent) {
    textComponent.setCaret(new DefaultCaret() {
      @Override
      protected void adjustVisibility(Rectangle nloc) { }
    });
  }
public static void doNotScrollToCaret(@NotNull JTextComponent textComponent)