-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement rs.bold, rs.b and rs.dim in addition to rs.bold_dim and rs.dim_bold #42
Comments
Vote for
|
Vote for
|
Not sure if this makes sense to do, but maybe do option (B) but make them work as intended: e.g., have |
@daxxycodes This would add a lot of complexity to sty and I'm sure it would hit hard on performance as well. It would also be difficult to keep sty thread safe, I guess. I don't want sty to go this route. Sty should stay lightweight and performant. The problem should be fixed on a lower level, IMHO. |
GitHub Discussions supports actual polls now, BTW 😉 |
Sty uses
rs.bold_dim
andrs.dim_bold
overrs.bold
andrs.dim
for the following reason:The ANSI "SGR (Select Graphic Rendition) parameters" which are used by terminals, do not allow resetting
bold
anddim
separately, there is only parameter22
which resets bothbold
anddim
. That means we cannot implement a resetter in sty which allows a user to resetbold
only ordim
only. When I implemented the resetters forbold
anddim
I decided to make this explicit, thus we havers.bold_dim
/rs.dim_bold
. I chose explicitness/correctness over beauty.After I read #41 I decided to create this ticket and leave it open for discussion if
rs.bold
,rs.b
andrs.dim
, should be added, even with the shortcomings (described above).I wrote down the pros/cons for both options.
A) Only offer
rs.bold_dim
/rs.dim_bold
(as implemented right now)bold
but notdim
or vice versa.B) Add
rs.b
/rs.bold
/rs.dim
and make it very clear in the docs, that each flag always resets both bold and dim.ef.bold
, close withrs.bold
.rs.b
vsrs.bold_dim
.bold
bot notdim
or vice versa.Right now I'm thinking, maybe
B)
is the more pragmatic solutions because:bold
but notdim
and vice versa, might be very rare and the pain from that may be smaller than the pain of all users who have to deal withbold_dim
/dim_bold
.I'm not sure about this, since there will be pain either way ;-)
I'd love to hear your opinios! You can also use the next two comments to vote for
A)
orB)
.The text was updated successfully, but these errors were encountered: