DL/IL should be ignored outside the scrolling region
From https://github.com/microsoft/terminal/issues/141
These commands:
printf "\033c1\n2\n3\n4\n5\n6\n7\n8\033[4r\033[H\033[M\033[r" && read -n 1
and
printf "\033c1\n2\n3\n4\n5\n6\n7\n8\033[4r\033[H\033[L\033[r" && read -n 1
should print the numbers from 1 to 8, with 1 being in the upper left corner. That is, \e033[M
(DL – delete lines) or \e[033[L
(IL – insert lines) should be ignored because the cursor is outside the scrolling region.
Quoting from the WT issue:
Here's what the DEC STD 070 manual has to say about the Insert Line command:
Only that portion of the display between the top, bottom, left, and right margins is affected. IL is ignored if the Active Position is outside the Scroll Area.
Similarly for the Delete Line command:
Only that portion of the display between the top, bottom, left, and right margins is affected. DL is ignored if the active position is outside the scroll area.
Xterm also implements this behavior.
ECMA-48 says nothing about this (at least not at DL and IL).
Actual VTE behavior: delete/insert a line.
Note that the given condition is mentioned at two other places in the doc as well, for DECIC (insert column) and DECDC (delete column), which are not supported by VTE.