viewportResize walks the full buffer when the terminal widens but called line.getBg without checking that lines.get(row) returned a line. During resize or trim gaps that could throw and abort tile expansion for remaining rows. Skip missing buffer lines with continue, consistent with render(). Co-authored-by: Cursor <cursoragent@cursor.com>