Terminal Guide

Fill Rectangular Area (DECFRA)

ESC1B[5B char ;3b toprow ;3b leftcolumn ;3b bottomrow ;3b rightcolumn $24 x78
char = see description
toprow = 0
leftcolumn = 0
bottomrow = see description
rightcolumn = see description

Fills a rectangular area with the character char.

If cursor origin mode is set the rectangle is interpreted relative to the top left of the current scroll region. Otherwise it's relative to the top left of the terminal.

bottomrow and rightcolumn default to their bottom-most/right-most valid values.

If cursor origin mode is set and the rectangle exceeds the current scroll region it's clipped to the current scroll region. Otherwise the rectangle is clipped to the full terminal.

If toprow > bottomrow or leftcolumn > rightcolumn this sequence does nothing.

If char is a not a printable latin1 character code (32 <= char < 127 or 160 <= char <= 255) this sequence does nothing. Otherwise it fills all cells in the given rectangle with the char char.

If the current SGR attributes have default background and foreground colors selected it keeps the colors of the filled cells. Else it replaces the colors with the colors from the current SGR state.

The other attributes of the cells are replaced by the current SGR state.

If filling the cells splits a multi cell character that character cleared, by replacing it by spaces, keeping its current attributes.

When only some of the lines have set set double width line, the region this sequence acts upon might not look rectangular in to the user on display.