GNU bug report logs -
#74876
31.0.50; Force fringe refresh / force-window-update not affecting fringes
Previous Next
Reported by: Michal Nazarewicz <mina86 <at> mina86.com>
Date: Sat, 14 Dec 2024 19:32:02 UTC
Severity: normal
Merged with 75291
Found in version 31.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 74876 <at> debbugs.gnu.org (full text, mbox):
On Sat, Dec 14 2024, Eli Zaretskii wrote:
> Can you show a simple Lisp which could be used to investigate the
> behavior and perhaps see how what you want could be enabled?
---- >% ----------------------------------------------------------------
(defvar-local adob-remapping nil)
(put 'adob-remapping 'permanent-local nil)
(defface adob-test '((t :background "red")) "Test")
(defun adob-test-for-each-window (func)
(save-current-buffer
(dolist (frame (frame-list))
(dolist (wnd (window-list frame))
(set-buffer (window-buffer wnd))
(when (funcall func wnd)
(force-window-update wnd))))))
(defun adob-test-update ()
(let ((face '(:filtered (:window adob-test t) adob-test))
(selected-window (selected-window)))
(adob-test-for-each-window
(lambda (wnd)
(let ((val (eq wnd selected-window)) update)
(unless adob-remapping
(setq adob-remapping (face-remap-add-relative 'fringe face)
update t))
(unless (eq val (window-parameter wnd 'adob-test))
(set-window-parameter wnd 'adob-test val)
(setq update t))
update)))))
(defun adob-test-on ()
(interactive)
(adob-test-update)
(add-hook 'post-command-hook #'adob-test-update))
(defun adob-test-off ()
(interactive)
(remove-hook 'post-command-hook #'adob-test-update)
(adob-test-for-each-window
(lambda (wnd)
(when adob-remapping
(face-remap-remove-relative adob-remapping)
(setq adob-remapping nil)
t))))
; (adob-test-on) to enable
; (adob-test-off) to disable
---- %< ----------------------------------------------------------------
1. Open two windows with two long buffers.
2. M-x adob-test-on RET
3. Scroll current window with M-v.
4. Switch to the other window with C-x o.
4. Scroll other window with C-M-v.
Expected: at all times, the fringes of the selected window are red while
fringes of the other window are grey.
Observed: Fringes are updated only when window is scrolled and new lines
are shown.
--
Best regards
ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»
This bug report was last modified 126 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.