Terminal Guide

DEC Set Columns per Page (DECSCPP)

ESC1B[5B columns $24 |7c
columns = 0

DEC set columns per page.

Modern terminals don't have a fixed width and users generally expect the terminal to keep the size they assigned to the terminal. This control violates that expectation.

If columns = 0 or columns = 80, resize the terminal to width 80. If columns = 132, resize the terminal to width 132.

If the cursor position is right of the right-most column after the resize move it to the right-most column.

Also updates the state of 132 column mode.