Add support for Erase Color Mode (DECECM) #19522

Open
opened 2026-01-31 06:45:59 +00:00 by claunia · 0 comments
Owner

Originally created by @j4james on GitHub (Mar 12, 2023).

Description of the new feature/enhancement

There are a number of operations that fill the background with "standard erase attributes", which means all characters attributes are reset, but the active background color is still applied.

However, on the VT525 you can control whether that background color is used with the Erase Color Mode (DECECM). If DECECM is set, those operations fill with the default colors, rather than the active colors.

This is useful when writing text with a background color that may wrap onto the next line. If that happens at the bottom of the page, the new line is completely filled with the active background color, which is usually not what you want. Setting DECECM can fix that.

Proposed technical implementation details (optional)

I was thinking we could possibly just add a flag to the TextAttribute::SetStandardErase method that specifies whether the rendition colors should be reset along with the character attributes. Then wherever we're calling SetStandardErase, we lookup the DECECM mode and pass that as the parameter.

Originally created by @j4james on GitHub (Mar 12, 2023). # Description of the new feature/enhancement There are a number of operations that fill the background with "standard erase attributes", which means all characters attributes are reset, but the active background color is still applied. However, on the VT525 you can control whether that background color is used with the _Erase Color Mode_ (`DECECM`). If `DECECM` is set, those operations fill with the default colors, rather than the active colors. This is useful when writing text with a background color that may wrap onto the next line. If that happens at the bottom of the page, the new line is completely filled with the active background color, which is usually not what you want. Setting `DECECM` can fix that. # Proposed technical implementation details (optional) I was thinking we could possibly just add a flag to the `TextAttribute::SetStandardErase` method that specifies whether the rendition colors should be reset along with the character attributes. Then wherever we're calling `SetStandardErase`, we lookup the `DECECM` mode and pass that as the parameter.
claunia added the Help WantedIssue-TaskIn-PRArea-VTNeeds-Tag-Fix labels 2026-01-31 06:46:00 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19522