Repository navigation
Render non-ASCII blanks and hyphens with the terminal's own face - #710
Merged
Merged
Conversation
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.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Emacs merges the
nobreak-spaceandnobreak-hyphenfaces 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,manhyphens), so this disables the highlight in terminal buffers, like a real terminal.Verified live in a TTY session:
\e[44m NBSP U+3000 \e[0mrenders as one unbroken background run; before, each blank was underlined with the escape-glyph foreground and the background reset mid-run.Unlike remapping
nobreak-spacetodefault(#709), this keeps the program's own per-cell face — a remap todefaultreplaces the cell's colors with the default face, punching holes in colored segments — and also coversnobreak-hyphen.Closes #708