Query left and right margins.
The terminal replies with
ESC1b P50 131 $24 r72 Ⓝleft ;3b Ⓝright s73 ESC1b \5c
Where left is the left-most column of the current scroll region and right is the right-most column of the current scroll region .
This sequence replies with the complete terminal size when left and right margin mode is not set.
See also set left and right margin.