termenv icon indicating copy to clipboard operation
termenv copied to clipboard

BackgroundColor should return err instead of default

Open eslam-allam opened this issue 10 months ago • 1 comments

The current implementation of BackgroundColor/ForegroundColor attempts to get the default color using a status report, or COLORFGBG if exists, or finally a default color if all else fails. I think this is problematic because I don't know whether the color I received was correct or not. This would make it impossible for me to restore the user's terminal to it's original colors. A much better approach in my opinion is to return an error telling me that the true color couldn't be fetched, giving me the chance to refrain from changing it in the first place.

eslam-allam avatar Apr 08 '24 14:04 eslam-allam

Is this repo no longer accepting issues?

eslam-allam avatar May 19 '24 15:05 eslam-allam