From a7582013010c041166c0b2055de6b73759fe9850 Mon Sep 17 00:00:00 2001 From: Zichang Date: Mon, 6 Oct 2025 00:12:22 +0800 Subject: [PATCH] Fixes crash on full screen scrolling --- metainfo.xml | 1 + src/vtbackend/Grid.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/metainfo.xml b/metainfo.xml index 92255b7ced..d103173cf9 100644 --- a/metainfo.xml +++ b/metainfo.xml @@ -125,6 +125,7 @@
  • Adds ability to name tabs (#1690)
  • Adds dynamic loading of conpty.dll to allow mouse mode on Windows 10
  • Fix empty history jump (#1781)
  • +
  • Fixes crash on full screen scrolling
  • diff --git a/src/vtbackend/Grid.cpp b/src/vtbackend/Grid.cpp index 114d0e4fdd..031970d159 100644 --- a/src/vtbackend/Grid.cpp +++ b/src/vtbackend/Grid.cpp @@ -525,8 +525,8 @@ void Grid::scrollDown(LineCount vN, GraphicsAttributes const& defaultAttri rotateBuffersRight(n); - for (Line& line: mainPage().subspan(0, unbox(n))) - line.reset(defaultLineFlags(), defaultAttributes); + for (auto const i: ranges::views::iota(0, *n)) + _lines[i].reset(defaultLineFlags(), defaultAttributes); return; }