emacs-devel
[Top][All Lists]
Advanced

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

Re: Allowing point to be outside the window?


From: Po Lu
Subject: Re: Allowing point to be outside the window?
Date: Sun, 05 Dec 2021 15:16:13 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Po Lu <luangruo@yahoo.com>
>> Cc: emacs-devel@gnu.org,  dick <dick.r.chiang@gmail.com>
>> Date: Sun, 05 Dec 2021 08:46:52 +0800
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> > But you could perhaps avoid a separate flag if you'd set
>> > w->cursor.vpos to a negative value when the cursor is outside of the
>> > window.
>> 
>> Actually, it now seems that cursor_visible_p is currently totally
>> redundant: cursor.vpos is already -1 when the cursor is supposed to be
>> invisible.
>> 
>> Can that value be relied on?
>
> Depends what for and how you want to rely on it.  It basically says
> that the cursor position inside the window is unknown.  The "normal"
> redisplay must always calculate some reasonable coordinates and put
> them there, otherwise the cursor will not be visible, which is a
> display bug.  If that is enough for you, then yes, you can rely on it.

I meant to ask whether or not I can forgo calculating whether point is
outside the window, and just test whether or not cursor.vpos is -1 to
determine if the cursor should be displayed, when point is allowed to be
outside the window.

Thanks.


reply via email to

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