Terminal Guide

Select Character Protection Attribute (DECSCA)

ESC1B[5B cmd "22 q71
xterm
cmd = 0

Select Character Protection Attribute.

If cmd = 1 the following printed characters are protected from selective erase. Otherwise the following printed characters are not protected from selective erase.

This is like an additional SGR State in that it modifies cells changed after this sequence until deactivated again with cmd != 1.

The semantics of protection from this sequence differs from start protected area in that this protection only applies when using selective erase line [dispatch], selective erase display [dispatch] and erase character. While the protection attribute is saved per cell the chosen semantic is global and the last seen sequence wins.