mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-09-04 00:46:17 +00:00
autoformat
This commit is contained in:
parent
3692fb01ec
commit
9475a58f0b
2 changed files with 12 additions and 10 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue