wyuenho / all-the-icons-dired

Adds dired support to all-the-icons
GNU General Public License v3.0
23 stars 7 forks source link

Fix incompatibility with the built-in "hl-line-mode" #13

Closed rudolf-adamkovic closed 2 years ago

rudolf-adamkovic commented 2 years ago

The icons break the highlight provided by the built-in hl-line-mode:

Screen Shot 2021-12-23 at 12 43 05

(Tested with the built-in Modus Operandi theme.)

protesilaos commented 2 years ago

I can reproduce this. Though it is not related to the active theme.

wyuenho commented 2 years ago

This isn't a bug in all-the-icons-dired but rather a bug in hl-line-mode and emacs in general. It's not possible to set the background alpha transparency of a face in emacs, and the hl-line-mode overlay is interfering with all-the-icons-dired's. Your best bet is to advice hl-line-move, which is called by both global-hl-line-highlight and hl-line-highlight. In the advice you can find the icon overlay and set the background of font-lock-face.

seagle0128 commented 2 years ago

@wyuenho I am experiencing the same issue. I went through the codes quickly, and think it's caused by overlay. It was introduced by https://github.com/jtbm37/all-the-icons-dired/pull/24.

https://github.com/wyuenho/all-the-icons-dired/blob/147ed0dfd1034a686795a08dc63e2c293128597e/all-the-icons-dired.el#L103-L104

wyuenho commented 2 years ago

There's no good fix for this short of emacs start supporting alpha transparency of a face.