Scroll region rendering broken in SwiftTerm after recent flickering fix

Resolved 💬 10 comments Opened Dec 19, 2025 by mihneadevries Closed Feb 27, 2026

Description

After the recent flickering fix (mentioned as fixed ~Dec 18-19, 2025), Claude Code's TUI has broken scroll region behavior when viewed through SwiftTerm-based terminal emulators (iOS).

Symptoms

  • The bottom part of the terminal (status bar, prompt area) stays correctly in place
  • The top part (main content area) scrolls up one line on each terminal update
  • Content gets pushed off the top of the screen progressively
  • The scroll region (DECSTBM) seems to be set correctly, but something causes an extra scroll on each output

Visual

The terminal looks like Claude Code has set scroll regions correctly (status bar fixed at bottom), but every time new output arrives, the top region scrolls up one extra line, pushing content off screen.

Environment

  • Terminal emulator: SwiftTerm (iOS)
  • App: Xtro (iOS terminal client connecting to Mac)
  • Issue started: Around Dec 18-19, 2025 (coinciding with flickering fix)

Notes

  • Other TUI apps (vim, htop, etc.) work correctly - only Claude Code exhibits this behavior
  • Rotating the device (forcing terminal resize/redraw) used to fix the issue temporarily, but no longer does
  • The issue exists across multiple commits of our app, suggesting the change is on Claude Code's side

Workaround attempts

  • Terminal resize (SIGWINCH) - no longer fixes it
  • Different terminal sizes - same issue

Request

Could you check if the recent flickering fix changed how scroll regions (DECSTBM - ESC[top;bottomr) are being set or how the screen is being refreshed? Something in that change appears incompatible with SwiftTerm's scroll region handling.

View original on GitHub ↗

This issue has 10 comments on GitHub. Read the full discussion on GitHub ↗