all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michal Nazarewicz <mina86@mina86.com>
To: Daniel Colascione <dancol@dancol.org>, Eli Zaretskii <eliz@gnu.org>
Cc: 75291@debbugs.gnu.org
Subject: bug#75291: Redisplay not updating fringe when face filter changes
Date: Thu, 02 Jan 2025 20:24:44 +0100	[thread overview]
Message-ID: <sjhnwpymtlxpr9zwaxwg5r9w@mina86.com> (raw)
In-Reply-To: <87ttah2hcd.fsf@dancol.org>

> Eli Zaretskii <eliz@gnu.org> writes:
>> I think this is bug#74876 again.  I tried to explain there why the way
>> the fringe drawing is implemented doesn't work well with
>> face-remapping (or with changes in the fringe face in general).
>>
>> Maybe I'm missing something, but supporting what this and that bug
>> want would need a rewrite of update_window_fringes (and possibly also
>> the way we record fringes' attributes in the glyph row).

On Thu, Jan 02 2025, Daniel Colascione wrote:
> (BTW: my code uses pre-redisplay-function, not a command hook. I've
> tried it both ways and found the redisplay hook to be more reliable.)

FYI, the actual auto-dim-other-buffers code doesn’t use
pre-command-hook.  It uses hooks for window, buffer or focus changes.

> Anyway, given that the feature has been implemented twice now, maybe we
> can find some way to make it work efficiently?

Since I managed to work-around the issue, I haven’t looked closely at
the low-level details of the redrawing code.  From afar it certainly
looks like it should be easy to force redrawing of fringes only, but
I also trust Eli’s opinion on complexity of this task more than my
impressions.

While I’d like to have a function indicating that particular window’s
fringes need to be updated (maybe something like ‘(force-window-update
window t)’, I won’t have time to work on this any time soon.

> Ideally, a change to a face in which the change couldn't possibly affect
> layout (e.g. changing a background color) would be pretty efficient from
> a redisplay POV, since we wouldn't have to even try to reflow any
> text.

I don’t think it’s that simple.  Even if all you’re changing is colour,
you still need to redraw the text.  At best, without anti-aliasing there
may be some way to optimise it but I doubt complicating the code to
support that would be worth it.

-- 
Best regards
ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»





  reply	other threads:[~2025-01-02 19:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-02 17:30 bug#75291: Redisplay not updating fringe when face filter changes Daniel Colascione
2025-01-02 17:50 ` Eli Zaretskii
2025-01-02 18:36   ` Daniel Colascione
2025-01-02 19:24     ` Michal Nazarewicz [this message]
2025-01-02 19:26     ` Eli Zaretskii
2025-01-02 19:50       ` Daniel Colascione
2025-01-02 20:56         ` Eli Zaretskii
2025-01-03 17:25           ` Daniel Colascione
2025-01-03 19:31             ` Eli Zaretskii
2025-01-03 19:46               ` Daniel Colascione
2025-01-03 20:10                 ` Eli Zaretskii
2025-01-03 20:27                   ` Eli Zaretskii
2025-01-03 20:57                   ` Daniel Colascione
2025-01-04  7:12                     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sjhnwpymtlxpr9zwaxwg5r9w@mina86.com \
    --to=mina86@mina86.com \
    --cc=75291@debbugs.gnu.org \
    --cc=dancol@dancol.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.