DCH—Delete Character

This control function deletes one or more characters from the cursor position to the right.

Format

CSI
9/11
Pn
3/n
P
5/0

Parameters

Pn
is the number of characters to delete. If Pn is greater than the number of characters between the cursor and the right margin, then DCH only deletes the remaining characters.

Default: Pn = 1.

Description

As characters are deleted, the remaining characters between the cursor and right margin move to the left. Character attributes move with the characters. The terminal adds blank spaces with no visual character attributes at the right margin. DCH has no effect outside the scrolling margins.