Skip to content

diff-hl-show-hunk-inline: Put underline at descent line#290

Merged
dgutov merged 1 commit into
dgutov:masterfrom
emreyolcu:inline-underline
Jun 24, 2026
Merged

diff-hl-show-hunk-inline: Put underline at descent line#290
dgutov merged 1 commit into
dgutov:masterfrom
emreyolcu:inline-underline

Conversation

@emreyolcu

Copy link
Copy Markdown
Contributor

Currently the inline popups display the top border (drawn using :underline on the header line) slightly too high. This is because Emacs draws underlines at the baseline unless x-underline-at-descent-line is enabled, but that setting affects Emacs globally. Since Emacs 29, the :underline attribute accepts the property :position, which specifies where the underline should be drawn. If it is non-nil, then the underline is displayed at the descent of the text instead of the baseline. I've made a tiny change to enable that property for underlines in diff-hl when Emacs 29+ is detected. I've included two screenshots below showing the difference. Notice that the bottom border is unaffected, because it's an overline.

Before:

Screenshot From 2026-06-21 16-02-00

After:

Screenshot From 2026-06-21 16-01-11

@dgutov
dgutov merged commit 23302ac into dgutov:master Jun 24, 2026
6 checks passed
@dgutov

dgutov commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Looks good, thanks!

@emreyolcu
emreyolcu deleted the inline-underline branch June 24, 2026 23:08
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.

2 participants