Skip to content

Commit 101c9aa

Browse files
committed
Bump Zireael to v1.3.5 and align backend style docs
1 parent cbcc15c commit 101c9aa

7 files changed

Lines changed: 22 additions & 13 deletions

File tree

docs/guide/styling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ New attribute SGR target mappings:
2525
- `overline` -> SGR `53`
2626
- `blink` -> SGR `5`
2727

28-
These codes are the intended terminal mapping for these attrs. Current drawlist encoding carries all three attrs; current backend emission includes `strikethrough`, while `overline` and `blink` remain encoded but may not be emitted until backend support is enabled.
28+
These codes are the terminal mapping used by the backend emitter. Drawlist encoding carries all three attrs, and backend emission now supports `strikethrough`, `overline`, and `blink` end-to-end (terminal rendering still depends on terminal support).
2929

3030
## Inline styles
3131

docs/guide/text-style-internals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Terminal target SGR codes for the new attrs are:
5151
- `overline` -> `53`
5252
- `blink` -> `5`
5353

54-
Drawlist encoding carries these bits in `style.attrs`. Current backend emission includes `strikethrough`; `overline` and `blink` are encoded and reserved for backend support expansion.
54+
Drawlist encoding carries these bits in `style.attrs`, and backend emission supports all three attrs (`strikethrough`, `overline`, `blink`) end-to-end. Terminal-visible behavior still depends on terminal support.
5555

5656
## Renderer Merge Cache (Fast Path)
5757

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d7c095e8fe9af74bbdc267019619d18ba85bd66c
1+
d551156b7d0e42b6d67952e62a33978167cf1de0

packages/native/vendor/zireael/src/core/zr_diff.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ static const uint8_t ZR_ANSI16_PALETTE[16][3] = {
5959
#define ZR_SGR_DIM 2u
6060
#define ZR_SGR_ITALIC 3u
6161
#define ZR_SGR_UNDERLINE 4u
62+
#define ZR_SGR_BLINK 5u
6263
#define ZR_SGR_REVERSE 7u
6364
#define ZR_SGR_STRIKETHROUGH 9u
65+
#define ZR_SGR_OVERLINE 53u
6466
#define ZR_SGR_FG_256 38u /* Extended foreground color */
6567
#define ZR_SGR_BG_256 48u /* Extended background color */
6668
#define ZR_SGR_COLOR_MODE_256 5u /* 256-color mode selector */
@@ -79,6 +81,8 @@ static const uint8_t ZR_ANSI16_PALETTE[16][3] = {
7981
#define ZR_STYLE_ATTR_REVERSE (1u << 3)
8082
#define ZR_STYLE_ATTR_DIM (1u << 4)
8183
#define ZR_STYLE_ATTR_STRIKE (1u << 5)
84+
#define ZR_STYLE_ATTR_OVERLINE (1u << 6)
85+
#define ZR_STYLE_ATTR_BLINK (1u << 7)
8286

8387
/* Adaptive sweep threshold tuning (dirty-row density, percent). */
8488
#define ZR_DIFF_SWEEP_DIRTY_LINE_PCT_BASE 35u
@@ -104,9 +108,10 @@ typedef struct zr_attr_map_t {
104108
} zr_attr_map_t;
105109

106110
static const zr_attr_map_t ZR_SGR_ATTRS[] = {
107-
{ZR_STYLE_ATTR_BOLD, ZR_SGR_BOLD}, {ZR_STYLE_ATTR_DIM, ZR_SGR_DIM},
108-
{ZR_STYLE_ATTR_ITALIC, ZR_SGR_ITALIC}, {ZR_STYLE_ATTR_UNDERLINE, ZR_SGR_UNDERLINE},
109-
{ZR_STYLE_ATTR_REVERSE, ZR_SGR_REVERSE}, {ZR_STYLE_ATTR_STRIKE, ZR_SGR_STRIKETHROUGH},
111+
{ZR_STYLE_ATTR_BOLD, ZR_SGR_BOLD}, {ZR_STYLE_ATTR_DIM, ZR_SGR_DIM},
112+
{ZR_STYLE_ATTR_ITALIC, ZR_SGR_ITALIC}, {ZR_STYLE_ATTR_UNDERLINE, ZR_SGR_UNDERLINE},
113+
{ZR_STYLE_ATTR_REVERSE, ZR_SGR_REVERSE}, {ZR_STYLE_ATTR_STRIKE, ZR_SGR_STRIKETHROUGH},
114+
{ZR_STYLE_ATTR_OVERLINE, ZR_SGR_OVERLINE}, {ZR_STYLE_ATTR_BLINK, ZR_SGR_BLINK},
110115
};
111116

112117
static bool zr_style_eq(zr_style_t a, zr_style_t b) {
@@ -612,7 +617,7 @@ static bool zr_emit_sgr_delta(zr_sb_t* sb, zr_term_state_t* ts, zr_style_t desir
612617

613618
/*
614619
Delta-safe subset:
615-
- add attrs (1/2/3/4/7/9) without reset
620+
- add attrs (1/2/3/4/5/7/9/53) without reset
616621
- update fg/bg colors directly
617622
Attr clears require reset to avoid backend-specific off-code assumptions.
618623
*/

packages/native/vendor/zireael/src/platform/posix/zr_plat_posix.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ enum {
6868
ZR_STYLE_ATTR_REVERSE = 1u << 3u,
6969
ZR_STYLE_ATTR_DIM = 1u << 4u,
7070
ZR_STYLE_ATTR_STRIKE = 1u << 5u,
71-
ZR_STYLE_ATTR_ALL_MASK = (1u << 6u) - 1u,
71+
ZR_STYLE_ATTR_OVERLINE = 1u << 6u,
72+
ZR_STYLE_ATTR_BLINK = 1u << 7u,
73+
ZR_STYLE_ATTR_ALL_MASK = (1u << 8u) - 1u,
7274
};
7375

7476
static _Atomic int g_posix_wake_fd_slots[ZR_POSIX_SIGWINCH_MAX_WAKE_FDS];
@@ -460,15 +462,15 @@ static uint32_t zr_posix_detect_sgr_attrs_supported(void) {
460462

461463
uint32_t attrs = ZR_STYLE_ATTR_BOLD | ZR_STYLE_ATTR_UNDERLINE | ZR_STYLE_ATTR_REVERSE | ZR_STYLE_ATTR_DIM;
462464
if (zr_posix_detect_truecolor_env()) {
463-
attrs |= ZR_STYLE_ATTR_ITALIC | ZR_STYLE_ATTR_STRIKE;
465+
attrs |= ZR_STYLE_ATTR_ITALIC | ZR_STYLE_ATTR_STRIKE | ZR_STYLE_ATTR_OVERLINE | ZR_STYLE_ATTR_BLINK;
464466
return attrs;
465467
}
466468

467469
const char* term = zr_posix_getenv_nonempty("TERM");
468470
static const char* kRichAttrTerms[] = {"xterm", "screen", "tmux", "rxvt", "alacritty", "kitty",
469471
"wezterm", "foot", "st", "rio", "ghostty"};
470472
if (zr_posix_str_has_any_ci(term, kRichAttrTerms, sizeof(kRichAttrTerms) / sizeof(kRichAttrTerms[0]))) {
471-
attrs |= ZR_STYLE_ATTR_ITALIC | ZR_STYLE_ATTR_STRIKE;
473+
attrs |= ZR_STYLE_ATTR_ITALIC | ZR_STYLE_ATTR_STRIKE | ZR_STYLE_ATTR_OVERLINE | ZR_STYLE_ATTR_BLINK;
472474
}
473475
return attrs;
474476
}

packages/native/vendor/zireael/src/platform/win32/zr_plat_win32.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ enum {
5656
ZR_STYLE_ATTR_REVERSE = 1u << 3u,
5757
ZR_STYLE_ATTR_DIM = 1u << 4u,
5858
ZR_STYLE_ATTR_STRIKE = 1u << 5u,
59-
ZR_STYLE_ATTR_ALL_MASK = (1u << 6u) - 1u,
59+
ZR_STYLE_ATTR_OVERLINE = 1u << 6u,
60+
ZR_STYLE_ATTR_BLINK = 1u << 7u,
61+
ZR_STYLE_ATTR_ALL_MASK = (1u << 8u) - 1u,
6062
ZR_WIN32_OUTPUT_WAIT_MODE_UNSUPPORTED = 0u,
6163
ZR_WIN32_OUTPUT_WAIT_MODE_IMMEDIATE_READY = 1u,
6264
ZR_WIN32_OUTPUT_WAIT_MODE_WAIT_HANDLE = 2u,
@@ -228,7 +230,7 @@ static uint8_t zr_win32_detect_focus_events(void) {
228230
static uint32_t zr_win32_detect_sgr_attrs_supported(void) {
229231
uint32_t attrs = ZR_STYLE_ATTR_BOLD | ZR_STYLE_ATTR_UNDERLINE | ZR_STYLE_ATTR_REVERSE | ZR_STYLE_ATTR_DIM;
230232
if (zr_win32_detect_modern_vt_host()) {
231-
attrs |= ZR_STYLE_ATTR_ITALIC | ZR_STYLE_ATTR_STRIKE;
233+
attrs |= ZR_STYLE_ATTR_ITALIC | ZR_STYLE_ATTR_STRIKE | ZR_STYLE_ATTR_OVERLINE | ZR_STYLE_ATTR_BLINK;
232234
}
233235
return attrs;
234236
}

0 commit comments

Comments
 (0)