[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 17:15:25 +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: 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.
Thanks. Another question or two: I can't use the value "-1" for
cursor.vpos to indicate that point is outside the window, as it's
already treated specially by redisplay, correct?
Also, where should I put the code to test if cursor is invisible? I
think it should be after the label force_start, as forcing the start
could potentially adjust point to be inside the window.
- Re: Allowing point to be outside the window?, (continued)
Re: Allowing point to be outside the window?, dick, 2021/12/04
- Re: Allowing point to be outside the window?, tomas, 2021/12/04
- Re: Allowing point to be outside the window?, Po Lu, 2021/12/04
- Re: Allowing point to be outside the window?, Eli Zaretskii, 2021/12/04
- Re: Allowing point to be outside the window?, Po Lu, 2021/12/04
- Re: Allowing point to be outside the window?, Eli Zaretskii, 2021/12/05
- Re: Allowing point to be outside the window?, Po Lu, 2021/12/05
- Re: Allowing point to be outside the window?, Eli Zaretskii, 2021/12/05
- Re: Allowing point to be outside the window?,
Po Lu <=
- Re: Allowing point to be outside the window?, Eli Zaretskii, 2021/12/05
- Re: Allowing point to be outside the window?, Po Lu, 2021/12/05
- Re: Allowing point to be outside the window?, Eli Zaretskii, 2021/12/05
- Re: Allowing point to be outside the window?, Po Lu, 2021/12/05
Re: Allowing point to be outside the window?, dick, 2021/12/04
Re: Allowing point to be outside the window?, Eli Zaretskii, 2021/12/04
Re: Allowing point to be outside the window?, dick, 2021/12/04
Re: Allowing point to be outside the window?, Po Lu, 2021/12/04
Re: Allowing point to be outside the window?, John Ankarström, 2021/12/07