From 03c234d03a47fd8b51836ba6f808cf9bed16351c Mon Sep 17 00:00:00 2001 From: Dustin Howett Date: Mon, 24 Aug 2020 14:35:45 -0700 Subject: [PATCH] TermControl: set the jump distance to one screenful on the scrollbar Most applications with scrollable content seem to define the "large jump" distance as about a screenful of content. You can see this in long pages in Settings and documents in Notepad. We just weren't configuring ScrollBar here. Fixes #7367 --- src/cascadia/TerminalControl/TermControl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cascadia/TerminalControl/TermControl.cpp b/src/cascadia/TerminalControl/TermControl.cpp index dd033691e5d..6c86ac93e36 100644 --- a/src/cascadia/TerminalControl/TermControl.cpp +++ b/src/cascadia/TerminalControl/TermControl.cpp @@ -156,6 +156,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation scrollBar.Maximum(update.newMaximum); scrollBar.Minimum(update.newMinimum); scrollBar.ViewportSize(update.newViewportSize); + scrollBar.LargeChange(std::max(update.newViewportSize - 1, 0.)); // scroll one "screenful" at a time when the scroll bar is clicked control->_isInternalScrollBarUpdate = false; } @@ -699,6 +700,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation ScrollBar().Minimum(0); ScrollBar().Value(0); ScrollBar().ViewportSize(bufferHeight); + ScrollBar().LargeChange(std::max(bufferHeight - 1, 0)); // scroll one "screenful" at a time when the scroll bar is clicked localPointerToThread->EnablePainting();