@@ -1056,10 +1056,7 @@ void Terminal::resizeScreenInternal(PageSize totalPageSize, std::optional<ImageS
1056
1056
{
1057
1057
// NOTE: This will only resize the currently active buffer.
1058
1058
// Any other buffer will be resized when it is switched to.
1059
- auto const statusLineHeight = _hostWritableStatusLineScreen.pageSize ().lines ;
1060
- auto const mainDisplayPageSize = _state.statusDisplayType == StatusDisplayType::None
1061
- ? totalPageSize
1062
- : totalPageSize - statusLineHeight;
1059
+ auto const mainDisplayPageSize = totalPageSize - statusLineHeight ();
1063
1060
1064
1061
auto const oldMainDisplayPageSize = _settings.pageSize ;
1065
1062
@@ -1692,10 +1689,7 @@ void Terminal::hardReset()
1692
1689
_hostWritableStatusLineScreen.clearScreen ();
1693
1690
_hostWritableStatusLineScreen.updateCursorIterator ();
1694
1691
1695
- auto const statusLineHeight = LineCount (1 );
1696
- auto const mainDisplayPageSize = _state.statusDisplayType == StatusDisplayType::None
1697
- ? _settings.pageSize
1698
- : _settings.pageSize - statusLineHeight;
1692
+ auto const mainDisplayPageSize = _settings.pageSize - statusLineHeight ();
1699
1693
1700
1694
_primaryScreen.margin () =
1701
1695
Margin { Margin::Vertical { {}, boxed_cast<LineOffset>(mainDisplayPageSize.lines ) - 1 },
@@ -1761,10 +1755,7 @@ void Terminal::applyPageSizeToCurrentBuffer()
1761
1755
1762
1756
void Terminal::applyPageSizeToMainDisplay (ScreenType screenType)
1763
1757
{
1764
- auto const statusLineHeight = LineCount (1 );
1765
- auto const mainDisplayPageSize = _state.statusDisplayType == StatusDisplayType::None
1766
- ? _settings.pageSize
1767
- : _settings.pageSize - statusLineHeight;
1758
+ auto const mainDisplayPageSize = _settings.pageSize - statusLineHeight ();
1768
1759
1769
1760
// clang-format off
1770
1761
switch (screenType)
0 commit comments