summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-11-14 12:29:18 -0600
committerCraig Jennings <c@cjennings.net>2025-11-14 12:29:18 -0600
commitff997a5ff2e561fbeac590b590bd8e7c6d2a920b (patch)
treec78c4af66ba113c96fb52d3dbf79c082ba7d33f8 /st.c
parent88fdb847bfc5c735a32cade72abf0dfaaa11ac5a (diff)
apply boxdraw patch for perfect box-drawing character alignment
Applied st-boxdraw_v2-0.8.5.diff with manual adjustments for st 0.9: - Added boxdraw.c to build sources - Added ATTR_BOXDRAW attribute flag (bit 13, after ATTR_SELECTED) - Integrated boxdraw detection in tsetchar() function - Modified xmakeglyphfontspecs() to use boxdraw for applicable characters - Adjusted indentation for harfbuzz integration compatibility Benefits: - Box-drawing characters now align perfectly regardless of font - Improved visual quality for tmux, tree, dialog output - Covers Unicode U2500-U259F (lines/blocks) and U28XX (braille)
Diffstat (limited to 'st.c')
-rw-r--r--st.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/st.c b/st.c
index fe54b95..57feebb 100644
--- a/st.c
+++ b/st.c
@@ -1446,6 +1446,9 @@ tsetchar(Rune u, const Glyph *attr, int x, int y)
term.line[y][x] = *attr;
term.line[y][x].u = u;
term.line[y][x].mode |= ATTR_SET;
+
+ if (isboxdraw(u))
+ term.line[y][x].mode |= ATTR_BOXDRAW;
}
void