diff --git a/plugins/terminal/src/org/jetbrains/plugins/terminal/block/reworked/TerminalOutputScrollingModelImpl.kt b/plugins/terminal/src/org/jetbrains/plugins/terminal/block/reworked/TerminalOutputScrollingModelImpl.kt index 346f3794d7f8..2c88ee67fb80 100644 --- a/plugins/terminal/src/org/jetbrains/plugins/terminal/block/reworked/TerminalOutputScrollingModelImpl.kt +++ b/plugins/terminal/src/org/jetbrains/plugins/terminal/block/reworked/TerminalOutputScrollingModelImpl.kt @@ -64,7 +64,7 @@ internal class TerminalOutputScrollingModelImpl( // The user has returned the scrollbar to the bottom, so we should stick to the bottom again. shouldScrollToCursor = true } - else if (e.oldRectangle.y != e.newRectangle.y) { + else if (e.oldRectangle != null && e.oldRectangle.y != e.newRectangle.y) { // The user has changed the scroll offset, so we should stop following the cursor. shouldScrollToCursor = false }