Skip to content

Commit

Permalink
TermControl: set the scrollbar jump distance to one screenful (#7385)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
DHowett authored Aug 24, 2020
1 parent 17e0c11 commit a5bed25
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cascadia/TerminalControl/TermControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -699,6 +700,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
ScrollBar().Minimum(0);
ScrollBar().Value(0);
ScrollBar().ViewportSize(bufferHeight);
ScrollBar().LargeChange(std::max<SHORT>(bufferHeight - 1, 0)); // scroll one "screenful" at a time when the scroll bar is clicked

localPointerToThread->EnablePainting();

Expand Down

0 comments on commit a5bed25

Please sign in to comment.