mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
cursor_as_sgr: fix bold/dim
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.
This commit is contained in:
parent
74e9bf4f31
commit
1b64167a3e
1 changed files with 2 additions and 2 deletions
|
|
@ -245,8 +245,8 @@ cursor_as_sgr(Cursor *self, Cursor *prev) {
|
|||
char *p = buf;
|
||||
bool intensity_differs = self->bold != prev->bold || self->dim != prev->dim;
|
||||
if (intensity_differs) {
|
||||
if (!self->bold || !self->dim) { P("%d", 22); }
|
||||
else P("%d;%d", 1, 2);
|
||||
if (!self->bold && !self->dim) { P("%d", 22); }
|
||||
else { if (self->bold) P("%d", 1); if (self->dim) P("%d", 2); }
|
||||
}
|
||||
if (self->italic != prev->italic) P("%d", self->italic ? 3 : 23);
|
||||
if (self->reverse != prev->reverse) P("%d", self->reverse ? 7 : 27);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue