mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-04 19:10:47 -05:00
The terminal emulator lives in the ViewModel and survives Activity recreation, but a recreated TerminalScreen draws its first frame before LaunchedEffect resizes the emulator to the new viewport. Nothing invalidated the drawing after the resize, so after rotating, the screen kept showing rows laid out for the old geometry instead of the end of the output, and the scrollbars used stale values. Refresh the snapshot state and redraw after every resize, through the same path used for new output, and keep a scrolled-up position within the transcript. Assisted-by: Claude Opus 5.5