[CodeWithMe] Keep scrolling console to end

GitOrigin-RevId: 35e60fec194030437f49c0ef95f31fc4ce478ac2
This commit is contained in:
Vyacheslav Moklev
2021-10-10 21:32:12 +00:00
committed by intellij-monorepo-bot
parent 3d06e34e69
commit 7889dc7568
@@ -757,7 +757,7 @@ public class ConsoleViewImpl extends JPanel implements ConsoleView, ObservableCo
editor.getInlayModel().getInlineElementsInRange(0, 0).forEach(Disposer::dispose); // remove inlays if any
}
private static boolean isStickingToEnd(@NotNull Editor editor) {
protected static boolean isStickingToEnd(@NotNull Editor editor) {
Document document = editor.getDocument();
int caretOffset = editor.getCaretModel().getOffset();
return document.getLineNumber(caretOffset) >= document.getLineCount() - 1;