Skip to content

Render non-ASCII blanks and hyphens with the terminal's own face - #710

Merged
dakra merged 1 commit into
mainfrom
fix/nobreak-char-display
Sep 20, 2026
Merged

dakra merged 1 commit into
mainfrom
fix/nobreak-char-display

Conversation

@dakra

@dakra dakra commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Emacs merges the nobreak-space and nobreak-hyphen faces over every Unicode Zs blank (U+00A0, U+2000–200A, U+202F, U+3000, …) and over U+00AD/2010/2011, overriding the fg/bg the program set for that cell and adding an underline. Programs use NBSP and ideographic spaces as layout padding (prompt segments, Claude Code's input box, CJK output, man hyphens), so this disables the highlight in terminal buffers, like a real terminal.

Verified live in a TTY session: \e[44m NBSP U+3000 \e[0m renders as one unbroken background run; before, each blank was underlined with the escape-glyph foreground and the background reset mid-run.

Unlike remapping nobreak-space to default (#709), this keeps the program's own per-cell face — a remap to default replaces the cell's colors with the default face, punching holes in colored segments — and also covers nobreak-hyphen.

Closes #708

Emacs merges the `nobreak-space' and `nobreak-hyphen' faces over every
Unicode Zs blank and U+00AD/2010/2011, overriding the fg/bg the program
set for that cell and adding an underline.  Programs use NBSP and
ideographic spaces as layout padding, so disable the highlight in
terminal buffers like a real terminal does.
@dakra
dakra merged commit 402ca63 into main Sep 20, 2026
33 checks passed
@dakra
dakra deleted the fix/nobreak-char-display branch September 20, 2026 09:22

This branch was successfully deployed

1 active deployment
github-pages — 402ca634 Deployed Sep 20, 2026 by dakra via deploy #203
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No-break spaces (U+00A0) use a visible face

1 participant