[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 10:19:30 +0200 |
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Thu, 02 Dec 2021 14:37:46 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Btw, why did you want to assume that? what did you want to do if
> > window_end_valid were true?
>
> I wanted to set w->cursor_valid_p (a field I added to `struct window')
> to false there, if PT > w->window_end_pos.
So you want to know whether point is beyond the window's end? That's
possible; we do that in several places in the existing code. It's
just slightly more complicated than a simple comparison with a known
value, and requires to use the move_it_* functions. Basically, you
tell move_it_to to move to PT or to last_visible_y, whichever happens
first, and then examine the results: if it reached PT, then point is
inside the window, otherwise it isn't.
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.
- try_cursor_movement not called?, Po Lu, 2021/12/01
- Re: try_cursor_movement not called?, Eli Zaretskii, 2021/12/01
- Re: try_cursor_movement not called?, Po Lu, 2021/12/01
- Re: try_cursor_movement not called?, Eli Zaretskii, 2021/12/01
- Re: try_cursor_movement not called?, Po Lu, 2021/12/01
- Re: try_cursor_movement not called?, Eli Zaretskii, 2021/12/01
- Re: try_cursor_movement not called?, Eli Zaretskii, 2021/12/02
- Re: try_cursor_movement not called?, Po Lu, 2021/12/02
- Re: try_cursor_movement not called?,
Eli Zaretskii <=
- Re: try_cursor_movement not called?, Po Lu, 2021/12/02
- Re: try_cursor_movement not called?, Eli Zaretskii, 2021/12/02