emacs-devel
[Top][All Lists]
Advanced

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

Re: try_cursor_movement not called?


From: Eli Zaretskii
Subject: Re: try_cursor_movement not called?
Date: Thu, 02 Dec 2021 12:17:55 +0200

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Thu, 02 Dec 2021 17:51:16 +0800
> 
> > But beware of the underwater rocks: the window could end in some
> > display property, like display string or image, or in a an overlay
> > string.  These cases require special care with the move_it_*
> > functions.
> 
> However, I don't know about this.  Could you perhaps elaborate further?

It's a very long story with a lot of confusing details.  Basically, if
there's any of those at the end of the window, the buffer position you
get when move_it_* functions return is not necessarily the one you
want, because those functions won't consider buffer positions while
they traverse display/overlay strings or images.  For example, if
point is "covered" by a display property, move_it_to will stop after
the display property, not at point.

I'm not sure how much of this is relevant for your use cases, though.
Just be sure to test the code when these properties are at point or at
the end of the window (if point is outside of the window).



reply via email to

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