tryUpdateViewportPixels
Updates text-area pixels only if the open session still has the expected grid.
Grid validation and metadata mutation share session serialization. Returns false without mutation when closure has begun, the grid differs, or a previous resize has not completed; callers can then use tryResizeViewport for a full resize. A successful update preserves content, selection anchors, and render generations. Subscribed notifications enter the ordered writer before this call returns.
Return
true if pixel metadata was admitted for the matching grid.
Parameters
expected terminal column count; at least TerminalBuffers.MIN_WIDTH.
expected positive terminal row count.
nonnegative text-area width excluding padding; zero means unknown.
nonnegative text-area height excluding padding; zero means unknown.