Open titibandit opened 3 years ago
My first guess is that we need to tell Emacs that fringes need to be refreshed somewhere similarly to how force-window-update
is called. That’s just speculation though.
(defun adob--force-update (object)
(force-window-update object)
;; Force fringes to be updated
(when fringe-mode
(dolist (wnd (if (windowp object)
(list object)
(get-buffer-window-list object nil t)))
(let* ((frame (window-frame wnd))
(params (frame-parameters frame))
(left (alist-get 'left-fringe params))
(right (alist-get 'right-fringe params)))
(when (and left right)
(modify-frame-parameters
frame '((left-fringe nil) (right-fringe nil)))
(modify-frame-parameters
frame `((left-fringe . ,left) (right-fringe . ,right))))))))
with all calls to force-window-update
replaced by calls to
adob--force-update
seems to be doing the trick. It is rather
inelegant function though and definitely not what we should be doing.
I've recently tried some more to look into this issue, but I really don't see a better solution as what we mentioned already. I don't see a more lightweight way to selectively change the background's color of a fringe. I'll settle for the time being with deactivating the fringes on my setup.
Hey, I'm trying to get the fringes to dim as well when unfocused. Right now, using the package unmodified, I have this behavior: The fringes are correctly set only for the initial window that was selected (the one on the right in that case). As soon as I change window focus, fringes are messed up.
I tried to implement the good behavior by adding
to the
adob--remap-face
function, but to no avail. I could get it to work by cycling thefringe-mode
in theabod--update
function:As you can see here:
However, cycling the fringe-mode is a little bit laggy: switching windows is not as fluid. So I wonder if there is a more efficient way of doing this? Cheers,