The old code would print "\e[22m" if either bold or dim was unset, which is the "normal, neither bold nor dim" control sequence. Print that only if neither are set, and instead print "1" and "2" (bold, dim) values individually.
= kitty - the fast, featureful, GPU based, terminal emulator See https://sw.kovidgoyal.net/kitty image::https://travis-ci.org/kovidgoyal/kitty.svg?branch=master[Build status, link=https://travis-ci.org/kovidgoyal/kitty]
Languages
Python
43.6%
C
28.3%
Go
20%
Objective-C
6%
Shell
1.5%
Other
0.5%