autoformat

This commit is contained in:
Kovid Goyal 2026-08-22 13:01:01 +05:30
parent 3692fb01ec
commit 9475a58f0b
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 12 additions and 10 deletions

View file

@ -4795,14 +4795,16 @@ screen_draw_overlay_line(Screen *self) {
const uint8_t orig_decoration = self->cursor->sgr.decoration;
const color_type orig_decoration_fg = self->cursor->sgr.decoration_fg;
self->cursor->sgr.italic = true;
self->cursor->sgr.decoration = 5; // dashed
self->cursor->sgr.decoration_fg =
((colorprofile_to_color_with_fallback(self->color_profile, self->color_profile->overridden.highlight_bg,
self->color_profile->configured.highlight_bg, self->color_profile->overridden.default_fg,
self->color_profile->configured.default_fg)
& COL_MASK)
<< 8)
| 2;
self->cursor->sgr.decoration = 5; // dashed
self->cursor->sgr.decoration_fg = ((colorprofile_to_color_with_fallback(
self->color_profile,
self->color_profile->overridden.highlight_bg,
self->color_profile->configured.highlight_bg,
self->color_profile->overridden.default_fg,
self->color_profile->configured.default_fg) &
COL_MASK)
<< 8) |
2;
self->cursor->x = xstart;
self->cursor->y = self->overlay_line.ynum;
self->overlay_line.xnum = 0;

View file

@ -2133,8 +2133,8 @@ class TestScreen(BaseTest):
self.assertFalse(c.reverse, f'pre-edit cell {x} is in reverse video')
self.ae(c.decoration, 5, f'pre-edit cell {x} is not dashed-underlined')
# decoration_fg is packed as (rgb << 8) | type, type 2 being RGB
self.ae(c.decoration_fg & 0xff, 2)
self.ae(c.decoration_fg >> 8, 0xfffacd) # default selection_background
self.ae(c.decoration_fg & 0xFF, 2)
self.ae(c.decoration_fg >> 8, 0xFFFACD) # default selection_background
# the styling is applied to the overlay's own cursor and must be
# restored, not leaked into the screen's cursor