Repository navigation
Let icons claim spaces whose style is invisible on blanks - #728
Merged
Merged
Conversation
adjustWidth refused to claim the space after a standalone oversized glyph whenever that space carried any cell property: bold, a foreground color, a hyperlink or OSC 133 prompt/input semantics. lsd and eza wrap icon, space and name in one SGR span, and shell prompts are semantic content, so nerd-font icons there were squeezed into a single cell and rendered at about half size. Only protect the space when hiding it loses something visible: the cursor cell, a background color, inverse, underline, strikethrough or overline.
emil-e
approved these changes
Oct 11, 2026
This branch was previously 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.
Fixes #727.
Problem
adjustWidthlets a standalone oversized glyph (e.g. a nerd-font icon) claim the following blank cell and hides that space with(space :width 0).followingCellProtectedblocked the claim whenever the space's run had anyCellPropKey— that includes bold, a foreground color, a hyperlink, and OSC 133 prompt/input semantic content.lsd and eza wrap icon, space and name in one SGR span, and shell prompts are semantic content, so icons in
lsoutput and in prompts were squeezed into one cell and rendered at about half size.Change
CellPropKey.spaceVisiblyStyleddecides whether hiding the space would lose something visible: a background color (cell or style), inverse, underline, strikethrough or overline. Only those spaces, plus the cursor cell, stay protected. The lookup runs only for oversized standalone glyphs.Tests
Native glyph tests, one per case:
Each background branch was checked by removing it and confirming its test fails.
Verified live in a GUI Emacs with
lsd --icon always --color alwaysand an icon in the bash prompt: icons render at full height, columns stay aligned, and bg/inverse/underline spaces remain visible.