From fadc5cf32ca88cd9f78ed592408516165fc83e2c Mon Sep 17 00:00:00 2001 From: Konstantin Hudyakov Date: Tue, 4 Feb 2025 10:19:41 +0200 Subject: [PATCH] [terminal] IJPL-176775 Fix NPE in TerminalOutputScrollingModel GitOrigin-RevId: 110464502e595d1bc4ff74e943ca12b5a533603c --- .../terminal/block/reworked/TerminalOutputScrollingModelImpl.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }