[terminal] IJPL-176775 Fix NPE in TerminalOutputScrollingModel

GitOrigin-RevId: 110464502e595d1bc4ff74e943ca12b5a533603c
This commit is contained in:
Konstantin Hudyakov
2025-02-04 09:42:36 +00:00
committed by intellij-monorepo-bot
parent 3e14c16503
commit fadc5cf32c
@@ -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
}