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: Eli Zaretskii
Subject: Re: Allowing point to be outside the window?
Date: Sun, 05 Dec 2021 10:48:21 +0200

> From: Po Lu <luangruo@yahoo.com>
> Cc: dick.r.chiang@gmail.com,  emacs-devel@gnu.org
> Date: Sun, 05 Dec 2021 15:16:13 +0800
> 
> >> 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.

No.  I think it should be the other way around: first see if point is
outside of the window, then force cursor.vpos to be negative.  That's
because redisplay resets that value to -1 whenever it isn't sure the
cursor will stay in its old position.



reply via email to

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