Refactor the TerminalDispatch graphics rendition to match AdaptDispatch #6725
Labels
Issue-Feature
Complex enough to require an in depth planning process and actual budgeted, scheduled work.
Needs-Tag-Fix
Doesn't match tag requirements
Needs-Triage
It's a new issue that the core contributor team needs to triage at the next triage meeting
Resolution-Fix-Committed
Fix is checked in, but it might be 3-4 weeks until a release.
Description of the new feature/enhancement
I'd like to propose we refactor the
SetGraphicsRendition
implementation in theTerminalDispatch
class to match the refactoring done forAdaptDispatch
in PR #5758.I've been looking at adding a few more of the SGR attributes, but I found that adding them to the
TerminalDispatch
was a bit of a pain, because every new attribute required a new method in theITerminalApi
interface. If we matched theAdaptDispatch
implementation, it would just be one more entry in the switch statement.Other benefits are that the
AdaptDispatch
implementation is a bit simpler, and easier to follow. It should be a little more efficient when dealing with multiple SGR options. And ultimately we're going to need these implementations to be identical anyway, so we can deduplicate them for issue #3849.Proposed technical implementation details (optional)
GetTextAttributes
andSetTextAttributes
methods to theITerminalApi
interface to match thePrivateGetTextAttributes
andPrivateSetTextAttributes
methods in theConGetSet
interface.AdaptDispatch::SetGraphicsRendition
implementation intoTerminalDispatch
. I think the only difference is we don't need the color index remapping, and the color index constants are different for the same reason (resolving that discrepancy is still on my TODO list).ITerminalApi
interface that are no longer required.The text was updated successfully, but these errors were encountered: