emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] User-defined fringe tooltips (a request for review)


From: Eli Zaretskii
Subject: Re: [PATCH] User-defined fringe tooltips (a request for review)
Date: Wed, 27 Mar 2024 14:14:27 +0200

> From: Vladimir Kazanov <vekazanov@gmail.com>
> Date: Tue, 26 Mar 2024 22:16:02 +0000
> Cc: emacs-devel@gnu.org
> 
> > However, I think there's an easy way of making the implementation
> > easier: just introduce a new overlay property called, say,
> > fringe-help-echo, and put that property on the same text as the
> > display property which produces the fringe.  Then the code in
> > note_fringe_highlight should simply check if the text which yielded
> > the fringe bitmap also has this special property on it, and if so,
> > display the tooltip.
> 
> Maybe an even easier solution would work:
> 
> 1. Record buffer position of the fringe display spec in struct it.
> Then move it to glyph_row the same way user_fringe_bitmap_id's are
> copied over.

When you say "move it", what is "it" in this case?

> 2. In note_fringe_highlight it becomes easy to retrieve the fringe
> display spec using a single call to get_char_property_and_overlay(),
> no need to iterate over a line, or have the implementation detail leak
> into text properties.

Why do you need to retrieve the display spec in note_fringe_highlight?

> What I don't really understand is whether I should handle overlays
> with after-string/before-string properties.

Ideally, yes.  Is there some complication there that would make those
overlays special?

> Should I just go through all overlays touching the spec position and
> parse into the after-string/before-string as well?

Not sure I understand the question, but maybe if you answer the ones
above, I will understand, or this question will answer itself.

> Pardon the many questions, display code has many moving parts.

No need to apologize.  Thanks for working on this.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]