radian-software / radian

🍉 Dotfiles that marry elegance and practicality.
MIT License
490 stars 47 forks source link

git-gutter-fringe isn't dispaly color on the fringe. when i use othe theme #456

Closed ijah4 closed 1 year ago

ijah4 commented 4 years ago

I turn off the default theme, then using the doom-theme. but the git-gutter-fringe can't work correctly. if i use the default theme zerodark , it is ok. I think the reason is about the advice radian--advice-git-gutter-remove-bitmaps I was trying to fix it, but i don't understand how it is working.

Thank you for your share. Emacs version: 28.0.50 OS: windows 10

raxod502 commented 4 years ago

Does the problem occur with every other theme, or only with your specific theme? You can test to see if the problem is the advice by disabling it and checking if that changes anything:

(advice-remove #'git-gutter-fr:view-diff-infos #'radian--advice-git-gutter-remove-bitmaps)
ijah4 commented 4 years ago

I test on the theme of doom-themes zenburn-theme leuven-theme, the color of fringe is still disappeared. Even though after adding (advice-remove #'git-gutter-fr:view-diff-infos #'radian--advice-git-gutter-remove-bitmaps)

It is strange that the gutter-fringe is coming, when i comment out the following code in radian.el

    (radian-defadvice radian--advice-git-gutter-remove-bitmaps
        (func &rest args)
      :around #'git-gutter-fr:view-diff-infos
      "Disable the cutesy bitmap pluses and minuses from `git-gutter-fringe'.
Instead, display simply a flat colored region in the fringe."
      (radian-flet ((defun fringe-helper-insert-region
                        (beg end _bitmap &rest args)
                      (apply fringe-helper-insert-region
                             beg end 'radian--git-gutter-blank args)))
        (apply func args))) 
raxod502 commented 4 years ago

Thank you for the report. I believe the problem is fixed now. The problem was that Zerodark defined a background color for the face, while other themes did not.

ijah4 commented 4 years ago

Now, It's normally displayed on lenven-theme. but on doom-theme zenburn-theme it is still invisible.

raxod502 commented 4 years ago

I can confirm that that is still a problem. I looked at it, and was unable to figure out what's going on. The face is customized correctly, however for some reason when the doom-one theme is enabled the background of the fringe bitmap is never shown. I checked to see if the problem was the customization of the fringe face, but no dice.

raxod502 commented 1 year ago

This seems fixed to me now with Emacs 28.1:

image